summaryrefslogtreecommitdiffstats
path: root/fs/fs_context.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-09-18 13:15:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-18 13:15:58 -0700
commite170eb27715fc9253ae031297d0638a3ef51b5da (patch)
tree3ae951bf6e1b759f91469a0a71ee0f59651bcc29 /fs/fs_context.c
parentb30d87cf969e1711f1f621b6b61efb145ee6c6d9 (diff)
parent0f071004109d9c8de7023b9a64fa2ba3fa87cbed (diff)
downloadlinux-e170eb27715fc9253ae031297d0638a3ef51b5da.tar.gz
linux-e170eb27715fc9253ae031297d0638a3ef51b5da.tar.bz2
linux-e170eb27715fc9253ae031297d0638a3ef51b5da.zip
Merge branch 'work.mount-base' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs mount API infrastructure updates from Al Viro: "Infrastructure bits of mount API conversions. The rest is more of per-filesystem updates and that will happen in separate pull requests" * 'work.mount-base' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: mtd: Provide fs_context-aware mount_mtd() replacement vfs: Create fs_context-aware mount_bdev() replacement new helper: get_tree_keyed() vfs: set fs_context::user_ns for reconfigure
Diffstat (limited to 'fs/fs_context.c')
-rw-r--r--fs/fs_context.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/fs_context.c b/fs/fs_context.c
index 103643c68e3f..87c2c9687d90 100644
--- a/fs/fs_context.c
+++ b/fs/fs_context.c
@@ -279,10 +279,8 @@ static struct fs_context *alloc_fs_context(struct file_system_type *fs_type,
fc->user_ns = get_user_ns(reference->d_sb->s_user_ns);
break;
case FS_CONTEXT_FOR_RECONFIGURE:
- /* We don't pin any namespaces as the superblock's
- * subscriptions cannot be changed at this point.
- */
atomic_inc(&reference->d_sb->s_active);
+ fc->user_ns = get_user_ns(reference->d_sb->s_user_ns);
fc->root = dget(reference);
break;
}