[RFC PATCH v3 7/8] fuse: export fuse_open_args_fill() helper function

Luis Henriques posted 8 patches 1 month, 1 week ago
[RFC PATCH v3 7/8] fuse: export fuse_open_args_fill() helper function
Posted by Luis Henriques 1 month, 1 week ago
Allow fuse_open_args_fill() fuction to be used from different files.

Signed-off-by: Luis Henriques <luis@igalia.com>
---
 fs/fuse/file.c   |  2 +-
 fs/fuse/fuse_i.h | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 1045d74dd95f..ea9023150a38 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -26,7 +26,7 @@
 /*
  * Helper function to initialize fuse_args for OPEN/OPENDIR operations
  */
-static void fuse_open_args_fill(struct fuse_args *args, u64 nodeid, int opcode,
+void fuse_open_args_fill(struct fuse_args *args, u64 nodeid, int opcode,
 			 struct fuse_open_in *inarg, struct fuse_open_out *outarg)
 {
 	args->opcode = opcode;
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 173032887fc2..f37959c76412 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -1588,10 +1588,14 @@ int fuse_file_io_open(struct file *file, struct inode *inode);
 void fuse_file_io_release(struct fuse_file *ff, struct inode *inode);
 
 /* file.c */
+void fuse_open_args_fill(struct fuse_args *args, u64 nodeid, int opcode,
+			 struct fuse_open_in *inarg,
+			 struct fuse_open_out *outarg);
+
 struct fuse_file *fuse_file_open(struct fuse_mount *fm, u64 nodeid,
-								struct inode *inode,
-								unsigned int open_flags,
-								bool isdir);
+				 struct inode *inode,
+				 unsigned int open_flags,
+				 bool isdir);
 void fuse_file_release(struct inode *inode, struct fuse_file *ff,
 		       unsigned int open_flags, fl_owner_t id, bool isdir);