diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-02-14 06:12:23 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-03-13 04:15:00 +0100 |
commit | e98f93e7ca71da61bc2ae7f433022e80bcb07d21 (patch) | |
tree | b31f17632e4d56e2aa97105f21e59d1bb34bc945 /fs/vboxsf/super.c | |
parent | afs: Fix updating of i_mode due to 3rd party change (diff) | |
download | linux-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.c | 4 |
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; } |