Message ID | 20241020105752.1767730-1-weilongping@oppo.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-f2fs-devel-bounces@lists.sourceforge.net> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9AAF3D3C927 for <linux-f2fs-devel@archiver.kernel.org>; Sun, 20 Oct 2024 11:31:35 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from <linux-f2fs-devel-bounces@lists.sourceforge.net>) id 1t2U9m-0004xP-WC; Sun, 20 Oct 2024 11:31:34 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from <weilongping@oppo.com>) id 1t2U9b-0004xB-20 for linux-f2fs-devel@lists.sourceforge.net; Sun, 20 Oct 2024 11:31:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=MIME-Version:Content-Type:Content-Transfer-Encoding :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mKPLZ/HxfMNYXuXYbcGmVRURGHED591fu3h5GMClQ3Q=; b=e5nb0pYeDY4Gn6WfyRWYauK6Q7 JWK58ebT9ZcMMul0g/kBBk/gqqb0Al62HTk2WqnnYD7QkcwfEE9PAeSAjiH+qCfmVlcnENtBS1/wN bEErA9dbDK3YWZERIOelwASvW0PQ2zsZk6XIz2uwS8pPGwtXuuUJEKBNwXwSyWyzsvvY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=mKPLZ/HxfMNYXuXYbcGmVRURGHED591fu3h5GMClQ3Q=; b=B DKthe3F2agI1P5rFxnsjl1lO6nUy6v8UF2zZi6M0pEW+/W5coobG2XN+OFJdf+nIDwLNbu3aKNYER Xgw0cNEPiLFS66/dF0JjJyn1q2Dohqh8yB2Hg9uRHewcSMVKv1+w1qcLfatr3oLRTxprisYcvAcEV 2oZsGXlyau1mrqZ4=; Received: from mail-koreacentralazon11013046.outbound.protection.outlook.com ([40.107.44.46] helo=SEYPR02CU001.outbound.protection.outlook.com) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1t2U9Z-00054J-D9 for linux-f2fs-devel@lists.sourceforge.net; Sun, 20 Oct 2024 11:31:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GQBRGGLe+1ORFcEInwElq0SAbiP8SzKQa5MuCNFBZt/OJEJxitt8tzGXf5cHFGLJQqKz5h63s0VGA4sbu9zSgASSCuWvcztMy2691PSBDjXtUBJVDpZB11vTzRqbewbe3FazMHuFITpsz6Mfqzd6do+dqK7diww9an2krsZpdOu6LHmM0ZhwP9H17KRL0tCXBgjRSKG3ppI/xZBLrFIFpNczvliIx0ov/Pve9hkcOHlKxyjq3p5dUEjid3+266PSnZ0NNvTUscCjXgBBuEk1kDXX+T6Q+30zd4WDFoSqHLufdWSejHON+GBzng9CchZ0qEW9BxlqJFKpCSxI8rACiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mKPLZ/HxfMNYXuXYbcGmVRURGHED591fu3h5GMClQ3Q=; b=K1ICNNhv/YsUFmVafLeiiavdQ+yhAmqPtUUTQjmRfMmzL5Q/bJsNfbTWGQFOq7UEylDHsxxOCkem2BN7NLKMn50n6cOF5PJ+lXnz/flHIUSU782nEaEdjTl4AEt5yLyePq5uArcz23SeiGTJC7TExVdGHDJwHUsOdgPVKbm/hXvaivuGPVHgs1KACEcQswbZMK/jlokq+pIYv+3irlMg0ubUjrO7EPuSsHxvxnhqmiVHAadLJMzGvay5uuIF1U/r8xkQharP+QnQEQR2WNgmldBAUIDZPNkR/CPdmkJE6GXlFZBV+ZMdzwvDn4Yq6Dzp9ijvavmbyQiiLUs3g+xtfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oppo.com; dmarc=pass action=none header.from=oppo.com; dkim=pass header.d=oppo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oppo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mKPLZ/HxfMNYXuXYbcGmVRURGHED591fu3h5GMClQ3Q=; b=Y7piOvgjsd3Ta0JnqQgfPJKsWdVY7WuozMa82AEDg5PxeWzqxE9bY3Rp6+BDWTnbjsFVje7KA3K27/nl9EhVtdFYnWMZcN4mVmexBDerxJ9GxPsA/HsJnRe5aZQEHjsOCmgZHb1tGebZV0x//f4OZjnmu7p0v945O9UKQv9jk1E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oppo.com; Received: from SEZPR02MB7967.apcprd02.prod.outlook.com (2603:1096:101:22a::14) by PUZPR02MB6049.apcprd02.prod.outlook.com (2603:1096:301:e6::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Sun, 20 Oct 2024 10:58:26 +0000 Received: from SEZPR02MB7967.apcprd02.prod.outlook.com ([fe80::5723:5b88:ed4c:d49b]) by SEZPR02MB7967.apcprd02.prod.outlook.com ([fe80::5723:5b88:ed4c:d49b%3]) with mapi id 15.20.8069.018; Sun, 20 Oct 2024 10:58:25 +0000 To: jaegeuk@kernel.org, chao@kernel.org Date: Sun, 20 Oct 2024 18:57:52 +0800 Message-Id: <20241020105752.1767730-1-weilongping@oppo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) To SEZPR02MB7967.apcprd02.prod.outlook.com (2603:1096:101:22a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR02MB7967:EE_|PUZPR02MB6049:EE_ X-MS-Office365-Filtering-Correlation-Id: a4cd34fd-cc78-4a4d-f827-08dcf0f61f0a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: jH7FLGyWP32Qm4pHiCKdS+8x1cPoNiPrEY+UskJRpwtRkBupJ+/ddZSJ1B1h1dJAmBNa+G6Ze4y00L9qF8A2h/GGLyhhN5uw7nC7viVNd92wlInS8Q9mbanTmN9m7lrgHebEfV2tW+cOkpK9FOl7jVmjXmWbXH4fKCDW33NGbrV5GZSzg2tc34KCjWiGb7P5jQ3fCxBEm6805IREbR6gctl7TNhcEkHeuWUi6JB201d/s4pJEG4Jw+UERY5OJ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io6HAubSUOjeaRQGYo8HQGSBenF+UaZkDl9fDf0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SEZPR02MB7967.apcprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DQfL0snnVnxUtw2WLkqm/bjgpKS0FK39Gs8ZDwTsPSHI/Jqq6LVTyHxqgTChwBsLf2oDtaAV7TxiRVSYREVh7EQmCHQEMlD0B9B6T5wwmuAXNgrjlRBqdET7/imZqBdAzFl46izt7TCfM3deh7e7K3bkMHx0cklriHfARuNoQ342fk2dO1JHq+ckcIQkWKM6I12r/oSIvU5bsABT6cSAN2SWWbfdHMBF6QuDUYCw/ggqksamDqwXs3HMIDBgmsGvvw5fB29Jq3VnlJQrppYDdS/fKpfzaw4A1kcmQ9mtPehChrYbJ/1bTD4oGuZNrAp9KkWWhd1KNoWyt7JNAp37cdTbmJXQ3uKYHM7bHvzkN6qpZofIkUZTWriWE0BMH+oen3K5jh2cqK7Nf7uwDvtiCasKvWDt71k0zswYoUHYKA78rRbPCM95JBntopBnhrfzWY+XxPfOlSEo6Qjx2/b6Y8236X912PywZvX+Lm1I6ty6fjBrkHu76DQ9uepWRukgE2zV0IQaP6Dd2PYmFEZhmI/DQ1CiWsMfop0+uJcMeeQOr/zH0Kye5pIqF71+P8e4Op98P1pKzn19HRe7TtXq9CPV6gQNNvaEaEfr+dBVdVyWIcFH4HfcBHFDgWO6NW/NesKmwNQEzbv5yzl3o2/z/1moAXHY66jEg0TV7YY3GmgpjMwskg3qg6cAiaxv3bNt9FG0NtcxCeyQ43wCquIlxoGjPbS9JkKia1kySLozI/aQ8SSetffglqMf1EDHFAFh17Vm9q8qKO2glVCZ9wkkli24i6q7cEdGhIqdCSi1ky6ORBG9qFRmCE+MMv8CvaNKKW8fkDUEkyXPtx610SnzQCOoVrL09pgKHN30AbtlCFJMgp93AwIAWjsCPKnisnzARBFJk9xrJ1s0l2jNILwgzeXhRbqrI0yXQj59UwXUh+Sc6D3UDh0funvORVMTcOcGLn0JrNSJG23yA3vts3ZbuJ29vzN9+DqN9U7OAIYiO3Yuk6e/mVCgsoYIXJV1XT7RCA2zRBFeFnnXAHLB8j/j2gPVoq33DFbMz1VwKzmH3rrieR9/XTyjQbvOvayznpXaMhJgv61aEDwqYAAlmRzv4GH9V56pWp5FbTw/ML1qnyVQIYEvvOnaKVBb3ZH31Joe3ciuFP3ym/VCRHTbpfv5gfAcx9tbH6LiJ18TZsQJw9FzX46vzZ8VKfnwzBuGdJuAxDzDHVEx0teYAoBPs80rxkiXh49opM6pLmsF9fU5Ty5zcJDjT+yeZVx/T+qayyKPM61wq9ZdLFMbFlKqInAJVlYAK0iRUfj8CbF9KTum5yVKXtj1eMlfGSorm7HocbzVNkyxW1gUynSwpswpdl/f5wQnsNJh2KOF9ChJr2djSXsE1Bz+lDb9PrLuEFQ8xXaZp4/SVDwNjvJvqF1jGvZEVpQrDfFE3Rvn/lyGQ7SM2NxPZRt4DU55F6x7sL1vfn46sX5gMPHFmMpSsN4v1DO22ffF34RVHI64CpetbGlPAZ9EwdFhV1+zwDWQ2IRXAYXKWISoEPtVIiPfTaF62Eg5Ox1oMDjtEHCfySDvnxUb7d7PIyQC+CR8YNM+sVP9We91WlcrT2p2k7xI/Y3GfQ3zKA== X-OriginatorOrg: oppo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4cd34fd-cc78-4a4d-f827-08dcf0f61f0a X-MS-Exchange-CrossTenant-AuthSource: SEZPR02MB7967.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2024 10:58:25.5727 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f1905eb1-c353-41c5-9516-62b4a54b5ee6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mr0PmomxBnVAZn7aNe5bq1SHgxhZ76iUj2AORW+mo2G01Cg9RuDtxcW6etv9jsY09wo+1yOZZL67UUT1TSY0qA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR02MB6049 X-Headers-End: 1t2U9Z-00054J-D9 Subject: [f2fs-dev] [PATCH] f2fs: fix the wrong f2fs_bug_on condition in f2fs_do_replace_block X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-f2fs-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/linux-f2fs-devel>, <mailto:linux-f2fs-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=linux-f2fs-devel> List-Post: <mailto:linux-f2fs-devel@lists.sourceforge.net> List-Help: <mailto:linux-f2fs-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel>, <mailto:linux-f2fs-devel-request@lists.sourceforge.net?subject=subscribe> From: LongPing Wei via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net> Reply-To: LongPing Wei <weilongping@oppo.com> Cc: LongPing Wei <weilongping@oppo.com>, 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 |
Series |
[f2fs-dev] f2fs: fix the wrong f2fs_bug_on condition in f2fs_do_replace_block
|
expand
|
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 1766254279d2..7b54b1851d34 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -3977,8 +3977,8 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, } } - f2fs_bug_on(sbi, !IS_DATASEG(type)); curseg = CURSEG_I(sbi, type); + f2fs_bug_on(sbi, !IS_DATASEG(curseg->seg_type)); mutex_lock(&curseg->curseg_mutex); down_write(&sit_i->sentry_lock);
This f2fs_bug_on was introduced by commit 2c1905042c8c3("f2fs: check segment type in __f2fs_replace_block") when there were only 6 curseg types. After commit d0b9e42ab6155(f2fs: introduce inmem curseg) was introduced, the condition should be changed to checking curseg->seg_type. Fixes: d0b9e42ab6155("f2fs: introduce inmem curseg") Signed-off-by: LongPing Wei <weilongping@oppo.com> --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)