diff options
author | Fan Li <fanofcode.li@samsung.com> | 2015-12-14 13:34:00 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-14 10:17:54 -0800 |
commit | d8fe4f0e74cb27e79b2b500ca6eae9f9b02748b4 (patch) | |
tree | d09cf0bcb4e04f94a752ac5174a8ef169c0e669a | |
parent | e1c51b9f1df2f9efc2ec11488717e40cd12015f9 (diff) | |
download | op-kernel-dev-d8fe4f0e74cb27e79b2b500ca6eae9f9b02748b4.zip op-kernel-dev-d8fe4f0e74cb27e79b2b500ca6eae9f9b02748b4.tar.gz |
f2fs: write only the pages in range during defragment
@lend of filemap_write_and_wait_range is supposed to be a "offset
in bytes where the range ends (inclusive)". Subtract 1 to avoid
writing an extra page.
Signed-off-by: Fan li <fanofcode.li@samsung.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 294e715..5fac4f2 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1686,7 +1686,7 @@ static int f2fs_defragment_range(struct f2fs_sb_info *sbi, /* writeback all dirty pages in the range */ err = filemap_write_and_wait_range(inode->i_mapping, range->start, - range->start + range->len); + range->start + range->len - 1); if (err) goto out; |