author: David Howells <dhowells@redhat.com> 2018-11-01 23:33:31 +0000
committer: Al Viro <viro@zeniv.linux.org.uk> 2019-03-20 18:49:06 -0400
commit: 24dcb3d90a1f67fe08c68a004af37df059d74005
parent: dadd2299ab61fc2b55b95b7b3a8f674cdd3b69c9
Commit Summary:
Diffstat:
1 file changed, 4 insertions, 0 deletions
diff --git a/fs/fs_context.c b/fs/fs_context.c
index 87e3546b9a52..eb806fae3117 100644
--- a/fs/fs_context.c
+++ b/fs/fs_context.c
@@ -271,6 +271,8 @@ static struct fs_context *alloc_fs_context(struct file_system_type *fs_type,
fc->cred = get_current_cred();
fc->net_ns = get_net(current->nsproxy->net_ns);
+ mutex_init(&fc->uapi_mutex);
+
switch (purpose) {
case FS_CONTEXT_FOR_MOUNT:
fc->user_ns = get_user_ns(fc->cred->user_ns);
@@ -353,6 +355,8 @@ struct fs_context *vfs_dup_fs_context(struct fs_context *src_fc)
if (!fc)
return ERR_PTR(-ENOMEM);
+ mutex_init(&fc->uapi_mutex);
+
fc->fs_private = NULL;
fc->s_fs_info = NULL;
fc->source = NULL;