diff options
author | Wei Fang <fangwei1@huawei.com> | 2020-06-15 10:11:38 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-06-18 21:33:18 +0200 |
commit | 6f6489288ed196a962ef8d33b1b9cf6369ff0807 (patch) | |
tree | 585ac710b302e98e0e761b0781a33c2ed5fd63b5 /fs/f2fs | |
parent | f2fs: use kfree() instead of kvfree() to free superblock data (diff) | |
download | linux-6f6489288ed196a962ef8d33b1b9cf6369ff0807.tar.xz linux-6f6489288ed196a962ef8d33b1b9cf6369ff0807.zip |
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: Wei Fang <fangwei1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 3268f8dd59bb..98721f9bef25 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -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) |