From: Yunlei He Date: Tue, 28 Feb 2017 12:32:41 +0000 (+0800) Subject: f2fs: fix an error return value in truncate_partial_data_page X-Git-Tag: v4.14-rc1~967^2~110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a78aaa2c3cf1e60f57ff7b2b3c07f0d469306984;p=platform%2Fkernel%2Flinux-rpi.git 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: Yunlei He Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5f73178..6d120a5 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -528,7 +528,7 @@ static int truncate_partial_data_page(struct inode *inode, u64 from, page = get_lock_data_page(inode, index, true); if (IS_ERR(page)) - return 0; + return PTR_ERR(page) == -ENOENT ? 0 : PTR_ERR(page); truncate_out: f2fs_wait_on_page_writeback(page, DATA, true); zero_user(page, offset, PAGE_SIZE - offset);