summaryrefslogtreecommitdiffstats
path: root/fs/vboxsf/vfsmod.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-01-21 10:55:03 +0100
committerHans de Goede <hdegoede@redhat.com>2021-06-23 14:36:46 +0200
commit02f840f90764f22f5c898901849bdbf0cee752ba (patch)
tree28a1a071de3eb4794714ea49f3e378b8d27c7ad0 /fs/vboxsf/vfsmod.h
parentab0c29687bc7a890d1a86ac376b0b0fd78b2d9b6 (diff)
downloadlinux-02f840f90764f22f5c898901849bdbf0cee752ba.tar.bz2
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.h7
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,