summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/mount.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-02 20:09:08 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-02 20:09:08 -0800
commit13df7977431e3b906a23bb75f29e0f40a8d73f87 (patch)
treebc2c78c3b816a65f90c31cccebdc15b38352c045 /fs/sysfs/mount.c
parent6d8b3e1ad3d3815d9c87b8553493301e243af76a (diff)
parent0414855fdc4a40da05221fc6062cccbc0c30f169 (diff)
downloadop-kernel-dev-13df7977431e3b906a23bb75f29e0f40a8d73f87.zip
op-kernel-dev-13df7977431e3b906a23bb75f29e0f40a8d73f87.tar.gz
Merge 3.14-rc5 into driver-core-next
We want the fixes in here.
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r--fs/sysfs/mount.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 5c7fdd9..a66ad61 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;
}
OpenPOWER on IntegriCloud