mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
f2fs: skip searching non-exist range in truncate_hole
Let's skip entire non-exist area to speed up truncate_hole by using get_next_page_offset. Signed-off-by: Weichao Guo <guoweichao@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
5b4267d195
commit
48ab25f486
1 changed files with 1 additions and 1 deletions
|
@ -857,7 +857,7 @@ int truncate_hole(struct inode *inode, pgoff_t pg_start, pgoff_t pg_end)
|
|||
err = get_dnode_of_data(&dn, pg_start, LOOKUP_NODE);
|
||||
if (err) {
|
||||
if (err == -ENOENT) {
|
||||
pg_start++;
|
||||
pg_start = get_next_page_offset(&dn, pg_start);
|
||||
continue;
|
||||
}
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue