Commit a78aaa2c authored by Yunlei He's avatar Yunlei He Committed by Jaegeuk Kim

f2fs: fix an error return value in truncate_partial_data_page

This patch fix a error return value in truncate_partial_data_page
Signed-off-by: default avatarYunlei He <heyunlei@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 1f020713
...@@ -528,7 +528,7 @@ static int truncate_partial_data_page(struct inode *inode, u64 from, ...@@ -528,7 +528,7 @@ static int truncate_partial_data_page(struct inode *inode, u64 from,
page = get_lock_data_page(inode, index, true); page = get_lock_data_page(inode, index, true);
if (IS_ERR(page)) if (IS_ERR(page))
return 0; return PTR_ERR(page) == -ENOENT ? 0 : PTR_ERR(page);
truncate_out: truncate_out:
f2fs_wait_on_page_writeback(page, DATA, true); f2fs_wait_on_page_writeback(page, DATA, true);
zero_user(page, offset, PAGE_SIZE - offset); zero_user(page, offset, PAGE_SIZE - offset);
......
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