提交 a5f64b6a 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

f2fs: fix to wait all atomic written pages writeback

This patch fixes the incorrect range (0, LONG_MAX) which is used
in ranged fsync. If we use LONG_MAX as the parameter for indicating
the end of file we want to synchronize, in 32-bits architecture
machine, these datas after 4GB offset may not be persisted in
storage after ->fsync returned.

Here, we alter LONG_MAX to LLONG_MAX to fix this issue.
Signed-off-by: NChao Yu <chao2.yu@samsung.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 6a290544
......@@ -1357,7 +1357,7 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp)
commit_inmem_pages(inode, false);
}
ret = f2fs_sync_file(filp, 0, LONG_MAX, 0);
ret = f2fs_sync_file(filp, 0, LLONG_MAX, 0);
mnt_drop_write_file(filp);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册