Commit 6f648928 authored by Wei Fang's avatar Wei Fang Committed by Jaegeuk Kim

f2fs: remove useless truncate in f2fs_collapse_range()

Since offset < new_size, no need to do truncate_pagecache() again
with new_size.
Signed-off-by: default avatarWei Fang <fangwei1@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 742532d1
......@@ -1373,8 +1373,6 @@ static int f2fs_collapse_range(struct inode *inode, loff_t offset, loff_t len)
truncate_pagecache(inode, offset);
new_size = i_size_read(inode) - len;
truncate_pagecache(inode, new_size);
ret = f2fs_truncate_blocks(inode, new_size, true);
up_write(&F2FS_I(inode)->i_mmap_sem);
if (!ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment