ANDROID: fs: Move iocb_to_rw_flags to fuse/passthrough

Fixup build error in aosp/2896080 by migrating iocb_to_rw_flags() to
FUSE passthrough, which depends on it.
To avoid possible name overlapping, the "fuse_" prefix is added to the
function name.

This change is meant to be a fixup for aosp/2896080.

Test: build
Bug: 168023149
Change-Id: I7696d22a0671cbd457084a17be4e7315109819a3
Signed-off-by: Alessio Balsini <balsini@google.com>
diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c
index a6d7dbc..63fc466 100644
--- a/fs/fuse/passthrough.c
+++ b/fs/fuse/passthrough.c
@@ -15,6 +15,11 @@
 	struct kiocb *iocb_fuse;
 };
 
+static inline rwf_t fuse_iocb_to_rw_flags(int ifl, int iocb_mask)
+{
+	return ifl & iocb_mask;
+}
+
 static void fuse_file_accessed(struct file *dst_file, struct file *src_file)
 {
 	struct inode *dst_inode;
@@ -95,9 +100,10 @@
 
 	old_cred = override_creds(ff->passthrough.cred);
 	if (is_sync_kiocb(iocb_fuse)) {
-		ret = vfs_iter_read(passthrough_filp, iter, &iocb_fuse->ki_pos,
-				    iocb_to_rw_flags(iocb_fuse->ki_flags,
-						     PASSTHROUGH_IOCB_MASK));
+		ret = vfs_iter_read(
+			passthrough_filp, iter, &iocb_fuse->ki_pos,
+			fuse_iocb_to_rw_flags(iocb_fuse->ki_flags,
+					      PASSTHROUGH_IOCB_MASK));
 	} else {
 		struct fuse_aio_req *aio_req;
 
@@ -143,9 +149,10 @@
 	old_cred = override_creds(ff->passthrough.cred);
 	if (is_sync_kiocb(iocb_fuse)) {
 		file_start_write(passthrough_filp);
-		ret = vfs_iter_write(passthrough_filp, iter, &iocb_fuse->ki_pos,
-				     iocb_to_rw_flags(iocb_fuse->ki_flags,
-						      PASSTHROUGH_IOCB_MASK));
+		ret = vfs_iter_write(
+			passthrough_filp, iter, &iocb_fuse->ki_pos,
+			fuse_iocb_to_rw_flags(iocb_fuse->ki_flags,
+					      PASSTHROUGH_IOCB_MASK));
 		file_end_write(passthrough_filp);
 		if (ret > 0)
 			fuse_copyattr(fuse_filp, passthrough_filp);