From: Linus Torvalds Date: Tue, 12 Mar 2019 21:08:19 +0000 (-0700) Subject: Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs X-Git-Tag: v5.15~6791 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b47a9e7c8f672b6fb0b77fca11a63a8a77f5a91;p=platform%2Fkernel%2Flinux-starfive.git Merge branch 'work.mount' of git://git./linux/kernel/git/viro/vfs Pull vfs mount infrastructure updates from Al Viro: "The rest of core infrastructure; no new syscalls in that pile, but the old parts are switched to new infrastructure. At that point conversions of individual filesystems can happen independently; some are done here (afs, cgroup, procfs, etc.), there's also a large series outside of that pile dealing with NFS (quite a bit of option-parsing stuff is getting used there - it's one of the most convoluted filesystems in terms of mount-related logics), but NFS bits are the next cycle fodder. It got seriously simplified since the last cycle; documentation is probably the weakest bit at the moment - I considered dropping the commit introducing Documentation/filesystems/mount_api.txt (cutting the size increase by quarter ;-), but decided that it would be better to fix it up after -rc1 instead. That pile allows to do followup work in independent branches, which should make life much easier for the next cycle. fs/super.c size increase is unpleasant; there's a followup series that allows to shrink it considerably, but I decided to leave that until the next cycle" * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (41 commits) afs: Use fs_context to pass parameters over automount afs: Add fs_context support vfs: Add some logging to the core users of the fs_context log vfs: Implement logging through fs_context vfs: Provide documentation for new mount API vfs: Remove kern_mount_data() hugetlbfs: Convert to fs_context cpuset: Use fs_context kernfs, sysfs, cgroup, intel_rdt: Support fs_context cgroup: store a reference to cgroup_ns into cgroup_fs_context cgroup1_get_tree(): separate "get cgroup_root to use" into a separate helper cgroup_do_mount(): massage calling conventions cgroup: stash cgroup_root reference into cgroup_fs_context cgroup2: switch to option-by-option parsing cgroup1: switch to option-by-option parsing cgroup: take options parsing into ->parse_monolithic() cgroup: fold cgroup1_mount() into cgroup1_get_tree() cgroup: start switching to fs_context ipc: Convert mqueue fs to fs_context proc: Add fs_context support to procfs ... --- 7b47a9e7c8f672b6fb0b77fca11a63a8a77f5a91 diff --cc fs/Makefile index 7bff9ab,9a0b8003..427fec2 --- a/fs/Makefile +++ b/fs/Makefile @@@ -13,7 -13,7 +13,7 @@@ obj-y := open.o read_write.o file_table seq_file.o xattr.o libfs.o fs-writeback.o \ pnode.o splice.o sync.o utimes.o d_path.o \ stack.o fs_struct.o statfs.o fs_pin.o nsfs.o \ - fs_types.o - fs_context.o fs_parser.o ++ fs_types.o fs_context.o fs_parser.o ifeq ($(CONFIG_BLOCK),y) obj-y += buffer.o block_dev.o direct-io.o mpage.o diff --cc fs/kernfs/mount.c index f3ac352,36376cc..9a4646e --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@@ -20,18 -20,8 +20,8 @@@ #include "kernfs-internal.h" -struct kmem_cache *kernfs_node_cache; +struct kmem_cache *kernfs_node_cache, *kernfs_iattrs_cache; - static int kernfs_sop_remount_fs(struct super_block *sb, int *flags, char *data) - { - struct kernfs_root *root = kernfs_info(sb)->root; - struct kernfs_syscall_ops *scops = root->syscall_ops; - - if (scops && scops->remount_fs) - return scops->remount_fs(root, flags, data); - return 0; - } - static int kernfs_sop_show_options(struct seq_file *sf, struct dentry *dentry) { struct kernfs_root *root = kernfs_root(kernfs_dentry_node(dentry)); diff --cc fs/proc/root.c index 621e6ec,6927b29..8b145e7 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@@ -154,9 -247,9 +247,9 @@@ static int proc_root_getattr(const stru static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) { - if (!proc_pid_lookup(dir, dentry, flags)) + if (!proc_pid_lookup(dentry, flags)) return NULL; - + return proc_lookup(dir, dentry, flags); } diff --cc include/linux/kernfs.h index 0cac1207,822a64e..c8893f6 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h @@@ -25,8 -25,9 +25,10 @@@ struct seq_file struct vm_area_struct; struct super_block; struct file_system_type; +struct poll_table_struct; + struct fs_context; + struct kernfs_fs_context; struct kernfs_open_node; struct kernfs_iattrs; diff --cc include/linux/security.h index 2b35a43,f28a1eb..49f2685 --- a/include/linux/security.h +++ b/include/linux/security.h @@@ -53,15 -53,15 +53,18 @@@ struct msg_msg struct xattr; struct xfrm_sec_ctx; struct mm_struct; + struct fs_context; + struct fs_parameter; + enum fs_value_type; +/* Default (no) options for the capable function */ +#define CAP_OPT_NONE 0x0 /* If capable should audit the security request */ -#define SECURITY_CAP_NOAUDIT 0 -#define SECURITY_CAP_AUDIT 1 +#define CAP_OPT_NOAUDIT BIT(1) +/* If capable is being called by a setid function */ +#define CAP_OPT_INSETID BIT(2) - /* LSM Agnostic defines for sb_set_mnt_opts */ + /* LSM Agnostic defines for fs_context::lsm_flags */ #define SECURITY_LSM_NATIVE_LABELS 1 struct ctl_table;