diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-03 07:53:09 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-03 07:53:09 +0400 |
commit | aa074c1c805a38c01c0dfe56f78d409e33be28a2 (patch) | |
tree | 5a361535d8df880af24e02b1508c2a6b44ae17c5 /fs/sysfs/mount.c | |
parent | 7a962a4b6e86d27a7ba1c325a5981b52ad72c29b (diff) | |
parent | 0414855fdc4a40da05221fc6062cccbc0c30f169 (diff) | |
download | linux-aa074c1c805a38c01c0dfe56f78d409e33be28a2.tar.xz |
Merge 3.14-rc5 into char-misc-next
We want these fixes in here as well.
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 6211230814fd..3eaf5c6622eb 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -27,6 +27,7 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type, { struct dentry *root; void *ns; + bool new_sb; if (!(flags & MS_KERNMOUNT)) { if (!capable(CAP_SYS_ADMIN) && !fs_fully_visible(fs_type)) @@ -37,8 +38,8 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type, } ns = kobj_ns_grab_current(KOBJ_NS_TYPE_NET); - root = kernfs_mount_ns(fs_type, flags, sysfs_root, ns); - if (IS_ERR(root)) + root = kernfs_mount_ns(fs_type, flags, sysfs_root, &new_sb, ns); + if (IS_ERR(root) || !new_sb) kobj_ns_drop(KOBJ_NS_TYPE_NET, ns); return root; } |