diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-01-21 10:55:03 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-06-23 14:36:46 +0200 |
commit | 02f840f90764f22f5c898901849bdbf0cee752ba (patch) | |
tree | 28a1a071de3eb4794714ea49f3e378b8d27c7ad0 /fs/vboxsf/vfsmod.h | |
parent | vboxsf: Make vboxsf_dir_create() return the handle for the created file (diff) | |
download | linux-02f840f90764f22f5c898901849bdbf0cee752ba.tar.xz linux-02f840f90764f22f5c898901849bdbf0cee752ba.zip |
vboxsf: Add vboxsf_[create|release]_sf_handle() helpers
Factor out the code to create / release a struct vboxsf_handle into
2 new helper functions.
This is a preparation patch for adding atomic_open support.
Fixes: 0fd169576648 ("fs: Add VirtualBox guest shared folder (vboxsf) support")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'fs/vboxsf/vfsmod.h')
-rw-r--r-- | fs/vboxsf/vfsmod.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/vboxsf/vfsmod.h b/fs/vboxsf/vfsmod.h index 6a7a9cedebc6..9047befa66c5 100644 --- a/fs/vboxsf/vfsmod.h +++ b/fs/vboxsf/vfsmod.h @@ -18,6 +18,8 @@ #define VBOXSF_SBI(sb) ((struct vboxsf_sbi *)(sb)->s_fs_info) #define VBOXSF_I(i) container_of(i, struct vboxsf_inode, vfs_inode) +struct vboxsf_handle; + struct vboxsf_options { unsigned long ttl; kuid_t uid; @@ -80,6 +82,11 @@ extern const struct file_operations vboxsf_reg_fops; extern const struct address_space_operations vboxsf_reg_aops; extern const struct dentry_operations vboxsf_dentry_ops; +/* from file.c */ +struct vboxsf_handle *vboxsf_create_sf_handle(struct inode *inode, + u64 handle, u32 access_flags); +void vboxsf_release_sf_handle(struct inode *inode, struct vboxsf_handle *sf_handle); + /* from utils.c */ struct inode *vboxsf_new_inode(struct super_block *sb); int vboxsf_init_inode(struct vboxsf_sbi *sbi, struct inode *inode, |