Commit be38b571 authored by Yongpeng Yang's avatar Yongpeng Yang Committed by Jaegeuk Kim
Browse files

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: default avatarYongpeng Yang <yangyongpeng@xiaomi.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 252cf8c4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)