Skip to content

Commit 2f3d8ff

Browse files
yangyun50Miklos Szeredi
authored andcommitted
fuse: use exclusive lock when FUSE_I_CACHE_IO_MODE is set
This may be a typo. The comment has said shared locks are not allowed when this bit is set. If using shared lock, the wait in `fuse_file_cached_io_open` may be forever. Fixes: 205c1d8 ("fuse: allow parallel dio writes with FUSE_DIRECT_IO_ALLOW_MMAP") CC: stable@vger.kernel.org # v6.9 Signed-off-by: yangyun <yangyun50@huawei.com> Reviewed-by: Bernd Schubert <bschubert@ddn.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1 parent fcd2d9e commit 2f3d8ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/fuse/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ static bool fuse_dio_wr_exclusive_lock(struct kiocb *iocb, struct iov_iter *from
13451345

13461346
/* shared locks are not allowed with parallel page cache IO */
13471347
if (test_bit(FUSE_I_CACHE_IO_MODE, &fi->state))
1348-
return false;
1348+
return true;
13491349

13501350
/* Parallel dio beyond EOF is not supported, at least for now. */
13511351
if (fuse_io_past_eof(iocb, from))

0 commit comments

Comments
 (0)