Skip to content

Commit be38b57

Browse files
Yongpeng YangJaegeuk Kim
authored andcommitted
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>
1 parent 252cf8c commit be38b57

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/f2fs/data.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3477,6 +3477,8 @@ static inline bool __should_serialize_io(struct inode *inode,
34773477
if (IS_NOQUOTA(inode))
34783478
return false;
34793479

3480+
if (f2fs_is_pinned_file(inode))
3481+
return false;
34803482
if (f2fs_need_compress_data(inode))
34813483
return true;
34823484
if (wbc->sync_mode != WB_SYNC_ALL)

0 commit comments

Comments
 (0)