diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-02 23:16:01 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-02 23:16:01 -0500 |
| commit | 013daec9c19b73ef1e8e427dd7c8acca5766c17e (patch) | |
| tree | c14c687f40ec22c5f48e23a08e8ae00c2ddfc2f9 /fs/sysfs/mount.c | |
| parent | bf13c9a894162a91c8bb7d9555933e9fc3ff7d0e (diff) | |
| parent | 0414855fdc4a40da05221fc6062cccbc0c30f169 (diff) | |
Merge 3.14-rc5 into tty-next
We want these fixes in here
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, | |||
| 27 | { | 27 | { |
| 28 | struct dentry *root; | 28 | struct dentry *root; |
| 29 | void *ns; | 29 | void *ns; |
| 30 | bool new_sb; | ||
| 30 | 31 | ||
| 31 | if (!(flags & MS_KERNMOUNT)) { | 32 | if (!(flags & MS_KERNMOUNT)) { |
| 32 | if (!capable(CAP_SYS_ADMIN) && !fs_fully_visible(fs_type)) | 33 | 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, | |||
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | ns = kobj_ns_grab_current(KOBJ_NS_TYPE_NET); | 40 | ns = kobj_ns_grab_current(KOBJ_NS_TYPE_NET); |
| 40 | root = kernfs_mount_ns(fs_type, flags, sysfs_root, ns); | 41 | root = kernfs_mount_ns(fs_type, flags, sysfs_root, &new_sb, ns); |
| 41 | if (IS_ERR(root)) | 42 | if (IS_ERR(root) || !new_sb) |
| 42 | kobj_ns_drop(KOBJ_NS_TYPE_NET, ns); | 43 | kobj_ns_drop(KOBJ_NS_TYPE_NET, ns); |
| 43 | return root; | 44 | return root; |
| 44 | } | 45 | } |
