diff options
Diffstat (limited to 'android-mainline/ANDROID-fs-Move-iocb_to_rw_flags-to-fuse-passthrough.patch')
-rw-r--r-- | android-mainline/ANDROID-fs-Move-iocb_to_rw_flags-to-fuse-passthrough.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/android-mainline/ANDROID-fs-Move-iocb_to_rw_flags-to-fuse-passthrough.patch b/android-mainline/ANDROID-fs-Move-iocb_to_rw_flags-to-fuse-passthrough.patch new file mode 100644 index 00000000..61c4d317 --- /dev/null +++ b/android-mainline/ANDROID-fs-Move-iocb_to_rw_flags-to-fuse-passthrough.patch @@ -0,0 +1,63 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Alessio Balsini <balsini@google.com> +Date: Fri, 5 Jan 2024 14:14:18 +0000 +Subject: 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> +--- + fs/fuse/passthrough.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c +--- a/fs/fuse/passthrough.c ++++ b/fs/fuse/passthrough.c +@@ -15,6 +15,11 @@ struct fuse_aio_req { + 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 @@ ssize_t fuse_passthrough_read_iter(struct kiocb *iocb_fuse, + + 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; + +@@ -139,9 +145,10 @@ ssize_t fuse_passthrough_write_iter(struct kiocb *iocb_fuse, + 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); |