diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-02-14 00:12:23 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-03-12 22:15:00 -0500 |
commit | e98f93e7ca71da61bc2ae7f433022e80bcb07d21 (patch) | |
tree | b31f17632e4d56e2aa97105f21e59d1bb34bc945 /fs/vboxsf/dir.c | |
parent | 6e1eb04a87f954eb06a89ee6034c166351dfff6e (diff) | |
download | lwn-e98f93e7ca71da61bc2ae7f433022e80bcb07d21.tar.gz lwn-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/dir.c')
-rw-r--r-- | fs/vboxsf/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/vboxsf/dir.c b/fs/vboxsf/dir.c index 7aee0ec63ade..eac6788fc6cf 100644 --- a/fs/vboxsf/dir.c +++ b/fs/vboxsf/dir.c @@ -225,7 +225,7 @@ static struct dentry *vboxsf_dir_lookup(struct inode *parent, } else { inode = vboxsf_new_inode(parent->i_sb); if (!IS_ERR(inode)) - vboxsf_init_inode(sbi, inode, &fsinfo); + vboxsf_init_inode(sbi, inode, &fsinfo, false); } return d_splice_alias(inode, dentry); @@ -245,7 +245,7 @@ static int vboxsf_dir_instantiate(struct inode *parent, struct dentry *dentry, sf_i = VBOXSF_I(inode); /* The host may have given us different attr then requested */ sf_i->force_restat = 1; - vboxsf_init_inode(sbi, inode, info); + vboxsf_init_inode(sbi, inode, info, false); d_instantiate(dentry, inode); |