From: Yunlei He Subject: [PATCH] f2fs: fix an error return value in truncate_partial_data_page Date: Tue, 28 Feb 2017 20:32:41 +0800 Message-ID: <20170228123241.5070-1-heyunlei@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cigto-0004Sh-Vr for linux-f2fs-devel@lists.sourceforge.net; Tue, 28 Feb 2017 12:29:00 +0000 Received: from [45.249.212.187] (helo=dggrg01-dlp.huawei.com) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1cigtm-0007QN-PE for linux-f2fs-devel@lists.sourceforge.net; Tue, 28 Feb 2017 12:29:00 +0000 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: jaegeuk@kernel.org, yuchao0@huawei.com, linux-f2fs-devel@lists.sourceforge.net This patch fix a error return value in truncate_partial_data_page Signed-off-by: Yunlei He --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index c6ca00c..c186d75 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -529,7 +529,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 page; truncate_out: f2fs_wait_on_page_writeback(page, DATA, true); zero_user(page, offset, PAGE_SIZE - offset); -- 2.10.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot