Merge branch 'merge.nfs-fs_parse.1' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 8 Feb 2020 21:26:41 +0000 (13:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 8 Feb 2020 21:26:41 +0000 (13:26 -0800)
Pull vfs file system parameter updates from Al Viro:
 "Saner fs_parser.c guts and data structures. The system-wide registry
  of syntax types (string/enum/int32/oct32/.../etc.) is gone and so is
  the horror switch() in fs_parse() that would have to grow another case
  every time something got added to that system-wide registry.

  New syntax types can be added by filesystems easily now, and their
  namespace is that of functions - not of system-wide enum members. IOW,
  they can be shared or kept private and if some turn out to be widely
  useful, we can make them common library helpers, etc., without having
  to do anything whatsoever to fs_parse() itself.

  And we already get that kind of requests - the thing that finally
  pushed me into doing that was "oh, and let's add one for timeouts -
  things like 15s or 2h". If some filesystem really wants that, let them
  do it. Without somebody having to play gatekeeper for the variants
  blessed by direct support in fs_parse(), TYVM.

  Quite a bit of boilerplate is gone. And IMO the data structures make a
  lot more sense now. -200LoC, while we are at it"

* 'merge.nfs-fs_parse.1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (25 commits)
  tmpfs: switch to use of invalfc()
  cgroup1: switch to use of errorfc() et.al.
  procfs: switch to use of invalfc()
  hugetlbfs: switch to use of invalfc()
  cramfs: switch to use of errofc() et.al.
  gfs2: switch to use of errorfc() et.al.
  fuse: switch to use errorfc() et.al.
  ceph: use errorfc() and friends instead of spelling the prefix out
  prefix-handling analogues of errorf() and friends
  turn fs_param_is_... into functions
  fs_parse: handle optional arguments sanely
  fs_parse: fold fs_parameter_desc/fs_parameter_spec
  fs_parser: remove fs_parameter_description name field
  add prefix to fs_context->log
  ceph_parse_param(), ceph_parse_mon_ips(): switch to passing fc_log
  new primitive: __fs_parse()
  switch rbd and libceph to p_log-based primitives
  struct p_log, variants of warnf() et.al. taking that one instead
  teach logfc() to handle prefices, give it saner calling conventions
  get rid of cg_invalf()
  ...

14 files changed:
1  2 
arch/x86/kernel/cpu/resctrl/rdtgroup.c
drivers/base/devtmpfs.c
drivers/block/rbd.c
drivers/usb/gadget/function/f_fs.c
fs/ceph/super.c
fs/fuse/inode.c
fs/gfs2/ops_fstype.c
fs/proc/root.c
fs/xfs/xfs_super.c
include/linux/fs.h
kernel/bpf/inode.c
kernel/cgroup/cgroup.c
security/selinux/hooks.c
security/smack/smack_lsm.c

Simple merge
Simple merge
Simple merge
diff --cc fs/ceph/super.c
Simple merge
diff --cc fs/fuse/inode.c
@@@ -499,23 -494,23 +494,23 @@@ static int fuse_parse_param(struct fs_c
  
        case OPT_ROOTMODE:
                if (!fuse_valid_type(result.uint_32))
-                       return invalf(fc, "fuse: Invalid rootmode");
+                       return invalfc(fc, "Invalid rootmode");
                ctx->rootmode = result.uint_32;
 -              ctx->rootmode_present = 1;
 +              ctx->rootmode_present = true;
                break;
  
        case OPT_USER_ID:
                ctx->user_id = make_kuid(fc->user_ns, result.uint_32);
                if (!uid_valid(ctx->user_id))
-                       return invalf(fc, "fuse: Invalid user_id");
+                       return invalfc(fc, "Invalid user_id");
 -              ctx->user_id_present = 1;
 +              ctx->user_id_present = true;
                break;
  
        case OPT_GROUP_ID:
                ctx->group_id = make_kgid(fc->user_ns, result.uint_32);
                if (!gid_valid(ctx->group_id))
-                       return invalf(fc, "fuse: Invalid group_id");
+                       return invalfc(fc, "Invalid group_id");
 -              ctx->group_id_present = 1;
 +              ctx->group_id_present = true;
                break;
  
        case OPT_DEFAULT_PERMISSIONS:
Simple merge
diff --cc fs/proc/root.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge