From: Weichao Guo <[email protected]> When first time pinning a file with size 0, and SBI_NEED_FSCK is set, we still got EINVAL after this fix: 19bdba5 (f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file). Let's avoid it since this new created file can do in-place-update.
Signed-off-by: Weichao Guo <[email protected]> --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 0fc6e02..0f07ec9 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2526,7 +2526,7 @@ bool f2fs_should_update_outplace(struct inode *inode, struct f2fs_io_info *fio) struct f2fs_sb_info *sbi = F2FS_I_SB(inode); /* The below cases were checked when setting it. */ - if (f2fs_is_pinned_file(inode)) + if (f2fs_is_pinned_file(inode) || inode->i_size == 0) return false; if (fio && is_sbi_flag_set(sbi, SBI_NEED_FSCK)) return true; -- 1.9.1 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
