MUSE needs to use this flag too, rename it to FUSE_DIO_NOFS to denote that the DIO operation has no FUSE backed inode. Signed-off-by: Richard Weinberger <richard@xxxxxx> --- fs/fuse/cuse.c | 4 ++-- fs/fuse/file.c | 4 ++-- fs/fuse/fuse_i.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index 45082269e698..55744430b0f0 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c @@ -96,7 +96,7 @@ static ssize_t cuse_read_iter(struct kiocb *kiocb, struct iov_iter *to) struct fuse_io_priv io = FUSE_IO_PRIV_SYNC(kiocb); loff_t pos = 0; - return fuse_direct_io(&io, to, &pos, FUSE_DIO_CUSE); + return fuse_direct_io(&io, to, &pos, FUSE_DIO_NOFS); } static ssize_t cuse_write_iter(struct kiocb *kiocb, struct iov_iter *from) @@ -108,7 +108,7 @@ static ssize_t cuse_write_iter(struct kiocb *kiocb, struct iov_iter *from) * responsible for locking and sanity checks. */ return fuse_direct_io(&io, from, &pos, - FUSE_DIO_WRITE | FUSE_DIO_CUSE); + FUSE_DIO_WRITE | FUSE_DIO_NOFS); } static int cuse_open(struct inode *inode, struct file *file) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index c03034e8c152..697e79032c73 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1409,7 +1409,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, loff_t *ppos, int flags) { int write = flags & FUSE_DIO_WRITE; - int cuse = flags & FUSE_DIO_CUSE; + int nofs = flags & FUSE_DIO_NOFS; struct file *file = io->iocb->ki_filp; struct inode *inode = file->f_mapping->host; struct fuse_file *ff = file->private_data; @@ -1430,7 +1430,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, return -ENOMEM; ia->io = io; - if (!cuse && fuse_range_is_writeback(inode, idx_from, idx_to)) { + if (!nofs && fuse_range_is_writeback(inode, idx_from, idx_to)) { if (!write) inode_lock(inode); fuse_sync_writes(inode); diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index d51598017d13..637caddff2a8 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -1140,8 +1140,8 @@ int fuse_do_open(struct fuse_mount *fm, u64 nodeid, struct file *file, /** If set, it is WRITE; otherwise - READ */ #define FUSE_DIO_WRITE (1 << 0) -/** CUSE pass fuse_direct_io() a file which f_mapping->host is not from FUSE */ -#define FUSE_DIO_CUSE (1 << 1) +/** CUSE and MUSE pass fuse_direct_io() a file which f_mapping->host is not from FUSE */ +#define FUSE_DIO_NOFS (1 << 1) ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, loff_t *ppos, int flags); -- 2.26.2