mirror of
https://github.com/torvalds/linux.git
synced 2024-09-21 07:23:06 +00:00
f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
Otherwise, it breaks pinfile's sematics. Cc: Daeho Jeong <daeho43@gmail.com> Signed-off-by: Chao Yu <chao@kernel.org> Reviewed-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
20faaf30e5
commit
48d180e2bf
|
@ -1595,8 +1595,9 @@ next_block:
|
|||
}
|
||||
|
||||
/* use out-place-update for direct IO under LFS mode */
|
||||
if (map->m_may_create &&
|
||||
(is_hole || (f2fs_lfs_mode(sbi) && flag == F2FS_GET_BLOCK_DIO))) {
|
||||
if (map->m_may_create && (is_hole ||
|
||||
(flag == F2FS_GET_BLOCK_DIO && f2fs_lfs_mode(sbi) &&
|
||||
!f2fs_is_pinned_file(inode)))) {
|
||||
if (unlikely(f2fs_cp_error(sbi))) {
|
||||
err = -EIO;
|
||||
goto sync_out;
|
||||
|
|
Loading…
Reference in New Issue
Block a user