Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

f2fs: allow parallel DIO reads

This fixes a regression which prevents parallel DIO reads.

Fixes: 0cac51185e65 ("f2fs: fix to avoid racing in between read and OPU dio write")
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

+2 -1
+2 -1
fs/f2fs/file.c
··· 4647 4647 iov_iter_count(to), READ); 4648 4648 4649 4649 /* In LFS mode, if there is inflight dio, wait for its completion */ 4650 - if (f2fs_lfs_mode(F2FS_I_SB(inode))) 4650 + if (f2fs_lfs_mode(F2FS_I_SB(inode)) && 4651 + get_pages(F2FS_I_SB(inode), F2FS_DIO_WRITE)) 4651 4652 inode_dio_wait(inode); 4652 4653 4653 4654 if (f2fs_should_use_dio(inode, iocb, to)) {