diff options
author | Yunlei He <heyunlei@huawei.com> | 2017-02-28 13:32:41 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-21 21:52:16 +0100 |
commit | a78aaa2c3cf1e60f57ff7b2b3c07f0d469306984 (patch) | |
tree | 6983f6c3817c5f969deb1b5de7e6dcd002a681d1 /fs/f2fs/file.c | |
parent | Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/... (diff) | |
download | linux-a78aaa2c3cf1e60f57ff7b2b3c07f0d469306984.tar.xz linux-a78aaa2c3cf1e60f57ff7b2b3c07f0d469306984.zip |
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 <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5f7317875a67..6d120a5b8f4b 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); |