diff options
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r-- | fs/nfsd/nfsctl.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index e7787777620e..65ad0165a94f 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -1151,20 +1151,15 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent) | |||
1151 | #endif | 1151 | #endif |
1152 | /* last one */ {""} | 1152 | /* last one */ {""} |
1153 | }; | 1153 | }; |
1154 | struct net *net = data; | 1154 | get_net(sb->s_fs_info); |
1155 | int ret; | 1155 | return simple_fill_super(sb, 0x6e667364, nfsd_files); |
1156 | |||
1157 | ret = simple_fill_super(sb, 0x6e667364, nfsd_files); | ||
1158 | if (ret) | ||
1159 | return ret; | ||
1160 | sb->s_fs_info = get_net(net); | ||
1161 | return 0; | ||
1162 | } | 1156 | } |
1163 | 1157 | ||
1164 | static struct dentry *nfsd_mount(struct file_system_type *fs_type, | 1158 | static struct dentry *nfsd_mount(struct file_system_type *fs_type, |
1165 | int flags, const char *dev_name, void *data) | 1159 | int flags, const char *dev_name, void *data) |
1166 | { | 1160 | { |
1167 | return mount_ns(fs_type, flags, current->nsproxy->net_ns, nfsd_fill_super); | 1161 | struct net *net = current->nsproxy->net_ns; |
1162 | return mount_ns(fs_type, flags, data, net, net->user_ns, nfsd_fill_super); | ||
1168 | } | 1163 | } |
1169 | 1164 | ||
1170 | static void nfsd_umount(struct super_block *sb) | 1165 | static void nfsd_umount(struct super_block *sb) |