From be38b5717a2953648dd294418b7c2dfdb8e81d7a Mon Sep 17 00:00:00 2001 From: Yongpeng Yang Date: Fri, 16 Jan 2026 00:47:50 +0800 Subject: [PATCH] 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 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.47.3