diff options
author | Chao Yu <chao@kernel.org> | 2024-04-28 04:12:36 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-04-29 20:41:17 +0300 |
commit | 48d180e2bf5a527ba6513a8abddf8b3beb6b7674 (patch) | |
tree | bcb5bada98b9091c68e41ee6bcf7d55fa9978c13 /fs/f2fs | |
parent | 20faaf30e55522bba2b56d9c46689233205d7717 (diff) | |
download | linux-48d180e2bf5a527ba6513a8abddf8b3beb6b7674.tar.xz |
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 0c516c653f05..a990236f137e 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -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; |