From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19CD9C33CB3 for ; Thu, 16 Jan 2020 17:11:48 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E1EC824697; Thu, 16 Jan 2020 17:11:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="NJ3GeGR5"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="LID2Ec+2"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="qibb/8vZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1EC824697 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1is8gN-0003Hb-3q; Thu, 16 Jan 2020 17:11:47 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1is8gJ-0003HP-0m for linux-f2fs-devel@lists.sourceforge.net; Thu, 16 Jan 2020 17:11:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iyYL2Mv1uMGnYJNtFU6pJqIBtdXfAlwieZjkuLn2wmA=; b=NJ3GeGR5/taTysTKiFFH8RwOpu IvA3NYJeLa8NalgLaO4TiGfXa/VpDa8q5Us1WRS/q+VRV/frO116j4PxlgZFE9q2l/At/XCPknDTD X7IeAgqwItzfrugT6e9uiiRwp+6AYibwfJ8bZxdcbZ2cqzQYY1giUvvb3k3OfZyBog1c=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=iyYL2Mv1uMGnYJNtFU6pJqIBtdXfAlwieZjkuLn2wmA=; b=LID2Ec+2xo3WlVP0U+HpENh0UN Ifs8hhl5iEH8fOEjasU1ecluANOKHzXMG5yUKmIpMNJRit2qL1uZdt4H/TZF0NMwahI4fecj9BTiO ihgMYnNk6pynD5ngdL6YHLkGvmhc0HZyrCbJ2zuNWgrisR/R5f/Vu6loAPONNGjWfTaM=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1is8gI-009YLw-0W for linux-f2fs-devel@lists.sourceforge.net; Thu, 16 Jan 2020 17:11:42 +0000 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C20A224684; Thu, 16 Jan 2020 17:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579194696; bh=NFOghJbHZHRuK3J9I5B8sv+qIgsl9qZfGJ1OMUcIJgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qibb/8vZC3PHhdTXoTUpwL8763VxX7mx9o44L28Tov/57oBrlAFZ10q3QwLxgF5gN o0rokLaJyqvUrfA4PYO4wtVwXwZ+X3OG7mLlQEvW1a6j/NMwze3SbVwqRJvRpz0bWu oABm5XWSaLEfCit6Xg1MV8jhOZBrX0n/ch4Y9Kmo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Date: Thu, 16 Jan 2020 12:02:55 -0500 Message-Id: <20200116170509.12787-274-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200116170509.12787-1-sashal@kernel.org> References: <20200116170509.12787-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-Headers-End: 1is8gI-009YLw-0W Subject: [f2fs-dev] [PATCH AUTOSEL 4.19 537/671] f2fs: fix error path of f2fs_convert_inline_page() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Chao Yu [ Upstream commit e8c82c11c93d586d03d80305959527bcac383555 ] In error path of f2fs_convert_inline_page(), we missed to truncate newly reserved block in .i_addrs[0] once we failed in get_node_info(), fix it. Fixes: 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/inline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 6bbb5f6801e2..3fe0dd531390 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -133,6 +133,7 @@ int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page) err = f2fs_get_node_info(fio.sbi, dn->nid, &ni); if (err) { + f2fs_truncate_data_blocks_range(dn, 1); f2fs_put_dnode(dn); return err; } -- 2.20.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5779C3F68F for ; Thu, 16 Jan 2020 17:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8195B2469B for ; Thu, 16 Jan 2020 17:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579194707; bh=NFOghJbHZHRuK3J9I5B8sv+qIgsl9qZfGJ1OMUcIJgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=a3n9gRZ2GrhilwrfGNNVd1tglCelVnF3Dak3B+vOj/DioRaRO5wfWOtBZZ+/3hIoB Ef9kKHiyIT2YRm/t2A/XPnpQgZDiXmWdEMe5auz7BWvaZYBhERE3MzNo+gwfanUd3l ZWrRNToyaW079UY5Q3hBFQ45yzhp4a+/mUtR9azE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390033AbgAPRLq (ORCPT ); Thu, 16 Jan 2020 12:11:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:52578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390294AbgAPRLg (ORCPT ); Thu, 16 Jan 2020 12:11:36 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C20A224684; Thu, 16 Jan 2020 17:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579194696; bh=NFOghJbHZHRuK3J9I5B8sv+qIgsl9qZfGJ1OMUcIJgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qibb/8vZC3PHhdTXoTUpwL8763VxX7mx9o44L28Tov/57oBrlAFZ10q3QwLxgF5gN o0rokLaJyqvUrfA4PYO4wtVwXwZ+X3OG7mLlQEvW1a6j/NMwze3SbVwqRJvRpz0bWu oABm5XWSaLEfCit6Xg1MV8jhOZBrX0n/ch4Y9Kmo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chao Yu , Jaegeuk Kim , Sasha Levin , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH AUTOSEL 4.19 537/671] f2fs: fix error path of f2fs_convert_inline_page() Date: Thu, 16 Jan 2020 12:02:55 -0500 Message-Id: <20200116170509.12787-274-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200116170509.12787-1-sashal@kernel.org> References: <20200116170509.12787-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chao Yu [ Upstream commit e8c82c11c93d586d03d80305959527bcac383555 ] In error path of f2fs_convert_inline_page(), we missed to truncate newly reserved block in .i_addrs[0] once we failed in get_node_info(), fix it. Fixes: 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/inline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 6bbb5f6801e2..3fe0dd531390 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -133,6 +133,7 @@ int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page) err = f2fs_get_node_info(fio.sbi, dn->nid, &ni); if (err) { + f2fs_truncate_data_blocks_range(dn, 1); f2fs_put_dnode(dn); return err; } -- 2.20.1