summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongpeng Yang <yangyongpeng@xiaomi.com>2026-01-15 19:47:50 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2026-01-27 05:45:58 +0300
commitbe38b5717a2953648dd294418b7c2dfdb8e81d7a (patch)
tree820425065b7f44625b4bdcb06d46db8ff9ffcecd
parent252cf8c4d679fc40cdb934da6c5128e5943fec3f (diff)
downloadlinux-be38b5717a2953648dd294418b7c2dfdb8e81d7a.tar.xz
f2fs: pin files do not require sbi->writepages lock for ordering
For pinned files, the file mapping is already established before writing, and since the writes are in IPU, there is no need to acquire the sbi->writepages lock to guarantee write ordering. Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/data.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 9ef875e7b34c..84746a06cd58 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -3477,6 +3477,8 @@ static inline bool __should_serialize_io(struct inode *inode,
if (IS_NOQUOTA(inode))
return false;
+ if (f2fs_is_pinned_file(inode))
+ return false;
if (f2fs_need_compress_data(inode))
return true;
if (wbc->sync_mode != WB_SYNC_ALL)