summaryrefslogtreecommitdiffstats
path: root/fs/vboxsf/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-02-14 06:12:23 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2021-03-13 04:15:00 +0100
commite98f93e7ca71da61bc2ae7f433022e80bcb07d21 (patch)
treeb31f17632e4d56e2aa97105f21e59d1bb34bc945 /fs/vboxsf/super.c
parentafs: Fix updating of i_mode due to 3rd party change (diff)
downloadlinux-e98f93e7ca71da61bc2ae7f433022e80bcb07d21.tar.xz
linux-e98f93e7ca71da61bc2ae7f433022e80bcb07d21.zip
vboxsf: don't allow to change the inode type
vboxsf_init_inode() is used both for initial setup of inode and for metadata updates. Tell it whether we are updating a live inode or setting up a new instance and have it refuse to change type in the former case. [fixed the braino caught by Hans de Goede <hdegoede@redhat.com>] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/vboxsf/super.c')
-rw-r--r--fs/vboxsf/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/vboxsf/super.c b/fs/vboxsf/super.c
index d7816c01a4f6..4f5e59f06284 100644
--- a/fs/vboxsf/super.c
+++ b/fs/vboxsf/super.c
@@ -207,7 +207,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc)
err = -ENOMEM;
goto fail_unmap;
}
- vboxsf_init_inode(sbi, iroot, &sbi->root_info);
+ vboxsf_init_inode(sbi, iroot, &sbi->root_info, false);
unlock_new_inode(iroot);
droot = d_make_root(iroot);
@@ -418,7 +418,7 @@ static int vboxsf_reconfigure(struct fs_context *fc)
/* Apply changed options to the root inode */
sbi->o = ctx->o;
- vboxsf_init_inode(sbi, iroot, &sbi->root_info);
+ vboxsf_init_inode(sbi, iroot, &sbi->root_info, true);
return 0;
}