From: Yongpeng Yang Date: Thu, 15 Jan 2026 16:47:50 +0000 (+0800) Subject: f2fs: pin files do not require sbi->writepages lock for ordering X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be38b5717a2953648dd294418b7c2dfdb8e81d7a;p=thirdparty%2Fkernel%2Flinux.git 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 --- 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)