Message ID | 20231214100148.3422585-1-bo.wu@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8427981dys; Thu, 14 Dec 2023 01:52:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdk6zRPi8pumOtw9DafG9yeqd3MG9U1/kWDu2v+6rZFTOumzhyDFP/EcL/NSFdqu8hotls X-Received: by 2002:a05:6a20:9706:b0:18f:97c:3856 with SMTP id hr6-20020a056a20970600b0018f097c3856mr8897521pzc.48.1702547572229; Thu, 14 Dec 2023 01:52:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702547572; cv=pass; d=google.com; s=arc-20160816; b=qImAkwIZlPkdxuM+9H7lkCWWTutNFrmld3wofAMT+SlgessClNMmTKYb03TS4LeO/B gXT5s+APPszxxbs3JIXcc/UUMRlvMPxEn++zp/0kYTOLwG8OAS05jZgahu2+/MUFlWxU ERW/6nDaJYgrI3PcXvT7IPbJCnzDuTcAKWlTRIjSU7s5m2NObnfLxItTpDE2ltP50Lrc GH9vr97ydHfNOe7rf47OjeCtNFQF15fi1c5SUnwXi6Z7hZnVNhCNwhLcsNeWHngDkkgz sVcBv+YqnZVABsu2mhJnYkNrYJe/I7nst1v0kLgLZYsz+KDOTmT2eH7ngsTcdPceDdBG riQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=hXXEq0b0hHGm8ETBkCEq0IGtrx5DccBno4BOfZDaOoI=; fh=6r9fIg9ozqA77HC/gAgdAwjWJUzbdXMAwecog0wIcQA=; b=OuZK5UiHmUVYHvCH8EEfZviQM93biLoqZ1M/AmvwvLJGTGoJy9fWWbTj5jcu6uFzGg n9/Kd/14j3kr0984qX/28cuzesHvxtdzyTTvUgmlPNht/jNHUMm7lCEACfR6DyWuMdKW s5x2uLoP0uD1hzJzWFvFnnWokGtLOw0TUAIGxn/9ZJWLbeQD8f6sxS0GCkDt8pi06274 S0aD6d/YA4iWvbpPZwcj5OyxER7rDS5+xxiJSBQE97+7cMd+hVkl7l6sSGMfW67kHg1M FuZ+qPf4Od9JkKPY5LsrfZnL51WH6vjMJnRwoEb8+BMaGzvs2VldyWUiIRFcu0AQ/6QT Uf1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=k5JRmgAr; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id n14-20020a63f80e000000b005ca4098bf63si3630004pgh.645.2023.12.14.01.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 01:52:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=k5JRmgAr; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id D0EF282E2950; Thu, 14 Dec 2023 01:52:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443528AbjLNJwj (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Thu, 14 Dec 2023 04:52:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443659AbjLNJwW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Dec 2023 04:52:22 -0500 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2106.outbound.protection.outlook.com [40.107.255.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D24DFD5B for <linux-kernel@vger.kernel.org>; Thu, 14 Dec 2023 01:52:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XktykoVseuQZRCEQp4XfuQb390YYKzTD+vJadbiX9it9McfYH/YG87m1Sn/tj8mSdZIxEEvcYEUXZT8JUPlA32Z4K8q0AXfmfsPLkTlqd02hlhgAJPdeeUv6MoSMrkntz5hah37TJMBsqmXaRtQnaqc235HKzIIMtei7/nJQR2bZq12xbo+f7oXERCTlCOqb3aN3tU1d12OMTeh/RBpED20UGDigHmQ3xG+Dn7ceeTpV9BUX3zyMmCOFX+Wq2K1ZCG+F8Folw7t/nS+trWA6U8wxk1jbTXKpKECBwv9QPnOCkm3gtg+PhkDi0NMHKZfo1CPJU6okYT4k3DfbCDVsBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=hXXEq0b0hHGm8ETBkCEq0IGtrx5DccBno4BOfZDaOoI=; b=B2V0HZ/J1VOc6HVl33pCWqzUt0fdbdv24T6byM+fWRBjIDRx/sa5kIhnSKtC29fE3FtSUA9DnLL9DBHi0O8tG2VYuGqevp2bhIkdiVqbgY0GKTjxYbdk5G9uOset/8XQHowXYSPF380wUcXkdPrOoXBe9bAXmcufgRhF3GigBMs1It/STan4hx7lSlLiIIcrYwIgKbQHrE0i2l2xqyc5Am6LqITmux6wpbtNz/zdkE2VURHo2IBoJH/1hcSbVAF3WXY0UuuN0yt5Bh0ms9ocOBJNM/O0lj5hMAcL321K95Q3BFJynrt2Q9oisWiuY0x+X/7cqa387T/qdyRBuHPx6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hXXEq0b0hHGm8ETBkCEq0IGtrx5DccBno4BOfZDaOoI=; b=k5JRmgAr89uXNL3Vo5QgpBaENCNJykjnP/D5PW5OLp0VEIZrwkmQ5ys8WatM87NMhBkZijoWv9i/mmlTYssHLnx0DK/LKA8IINYzadRu6wTM7yJ1OegyTDAVrVrATU/OKw/xCqvSVx70QGV4QzLhBciXi9L22CUyHu7fPMaqJ5CdhpqsXDh2bLqt2paQFQ2rY9VhyuEF8XVdD4R8EJdq6UvIAzs1pty+2anTT1pE9I1+kAh9UjGaYNb0ZfD4KaF+qHwK1dFHwe4BtU4XkMrBiifz8b395nuV4BymrvkMp9uWfpmGFr6IjNWkWMriw7VFYS8A68Y/1dyTPZQmn0f/kw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TY2PR06MB3520.apcprd06.prod.outlook.com (2603:1096:404:100::22) by TYZPR06MB4381.apcprd06.prod.outlook.com (2603:1096:400:66::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Thu, 14 Dec 2023 09:51:58 +0000 Received: from TY2PR06MB3520.apcprd06.prod.outlook.com ([fe80::e5e:d180:d199:47af]) by TY2PR06MB3520.apcprd06.prod.outlook.com ([fe80::e5e:d180:d199:47af%6]) with mapi id 15.20.7091.028; Thu, 14 Dec 2023 09:51:58 +0000 From: Wu Bo <bo.wu@vivo.com> To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org> Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Wu Bo <wubo.oduw@gmail.com>, Wu Bo <bo.wu@vivo.com> Subject: [PATCH] fsck.f2fs: fix orphan inode check fail Date: Thu, 14 Dec 2023 03:01:48 -0700 Message-Id: <20231214100148.3422585-1-bo.wu@vivo.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0192.apcprd01.prod.exchangelabs.com (2603:1096:4:189::21) To TY2PR06MB3520.apcprd06.prod.outlook.com (2603:1096:404:100::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY2PR06MB3520:EE_|TYZPR06MB4381:EE_ X-MS-Office365-Filtering-Correlation-Id: df8a96e1-307d-4ac4-83bb-08dbfc8a4fd3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eAVAr+cFsxlAfJt5hybX5XurAHZg3RhpFglIGQp1wfx8tHmg/P3a5LEyZqeWv79mBfZRIo9hBdV+fGfcc8PF1vzfFdTqXSRbtS12cyvQ/2UDHbktVa52813UNrwAt7HjyEDJBit088attzdTeIDf0cPk4CuCO6knYhS1tYm/mjFr8PwQ7bHfqO14eaz6QjHe2K6QThqD5kl38bhcyBlFHVAubbI8iPAgbNTm0qu7Y0r1w4kTD/gx2BLpiDFSv77WdmmVPN5EwbTis5eI4NOqqcgmFOx2gjGjEh2uLLTt1mQuNDFTJOXBKNtlxkZAyRiviyFfyJ649LrM2dny+72zXGM+tBiS2zMFts3u4KaYbGhD+UoRA0pJqRl4nE6ayf/8k2/augjt+FDIj/mGwF5XlY3krcFGnwnKIjHk7qgGOZCkSIfZOs5BxDs4/dUBb7TXn4RfOOoo/izxphYIGkENIZ0rc+jDs2X9PA2eKvuQAfNnDFrfIxl58bGY56FFZYFnys6hsmXWRciElcL0TV61bM0Waw7VgO/db3wgsDiBDyVPTNYz1S8mpdwJdMpvYWUIp5ygtwhgNJAruPzNBcQ3R53jcBU//Mp7e0KBzpJVlQKc7MEZKJ0Nz8UaOFYX6R4h X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY2PR06MB3520.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39850400004)(346002)(136003)(376002)(396003)(366004)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(8676002)(4326008)(8936002)(4744005)(2906002)(5660300002)(6506007)(6486002)(6666004)(6512007)(478600001)(52116002)(66556008)(54906003)(66946007)(66476007)(316002)(110136005)(41300700001)(38100700002)(86362001)(36756003)(38350700005)(83380400001)(2616005)(1076003)(26005)(107886003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Lk0L0dBeKJB/t/VAbZlptk8PQfnyzUaiav+ZU6HDGEmnFTXiPzvTaq/Wvnhi1t/fsvBWAKQjwEfMxoVdUywx3mfUO5ZqFQ/axquMuPdRdWEYLF71DtRj8n6mHNFQepW2gFEy3JA8+Pi5kGWQsHfIoetEvPsBLgQ6W0MNj85MntF+GOSnI6XIYBjzcwvHmHpQ8hWNywdTALkHpHcKkNqDS0pGElnC9YO45nwt20mQEnqMJZQxJltP51kP2j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nHrAY4CZnpj7yzPKhcBO7F+kvYa7UYQvhnVjZAUgA8N4gsxNmPZa8QtMEfYJa8eQ7nINziivuT+f0nX2h+a+Df5pa5LO3t/Y+NXENYCodDXb0sLQKkzNxLTdt16GWI6eTBD3obM21joGOjmXh/+flcb/+r/oca1stypIuYbivd6+VU2Gt1vf0o8u3vrbLSY0fxeNhBZOc4Rf8GIJpLiOD3f/HnsJgUoSn05isnk41tfWVjLvAlVh2p/PyyNObmPJHpOuP+r0jPXBB7+EqHpd5uFj8O X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: df8a96e1-307d-4ac4-83bb-08dbfc8a4fd3 X-MS-Exchange-CrossTenant-AuthSource: TY2PR06MB3520.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 09:51:58.4928 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Vu7DnOaXZIn16W49Rb3ZbNQLjlZ/ybzApa54FvtNP5RMN8+b25SiXUdGqVsmgT6qfTumJdiVGYIKgtdmAplXdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB4381 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 14 Dec 2023 01:52:49 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785250523076876536 X-GMAIL-MSGID: 1785250523076876536 |
Series |
fsck.f2fs: fix orphan inode check fail
|
|
Commit Message
Wu Bo
Dec. 14, 2023, 10:01 a.m. UTC
Call path:
fsck_chk_orphan_node
fsck_chk_node_blk
fsck_chk_inode_blk
'F2FS_FT_ORPHAN' will pass to fsck_chk_inode_blk(). If the orphan inode
is a DIR, it will be wrongly fixed.
Fixes: 8fd836f ("fsck: clear unexpected casefold flags")
Signed-off-by: Wu Bo <bo.wu@vivo.com>
---
fsck/fsck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c index e93db82..3461a52 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -1052,7 +1052,7 @@ check_next: ofs = get_extra_isize(node_blk); if ((node_blk->i.i_flags & cpu_to_le32(F2FS_CASEFOLD_FL)) && - (ftype != F2FS_FT_DIR || + (!S_ISDIR(le16_to_cpu(node_blk->i.i_mode)) || !(c.feature & F2FS_FEATURE_CASEFOLD))) { ASSERT_MSG("[0x%x] unexpected casefold flag", nid); if (c.fix_on) {