Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6081262rwl; Tue, 4 Apr 2023 07:37:04 -0700 (PDT) X-Google-Smtp-Source: AKy350Y/UsAFTiLa8k3WRGzEFFE64iKggsYf9fXNU9kpxrg3TqYLIleDJhYi/fZ/wl7P+Vd/ctM/ X-Received: by 2002:a17:902:c713:b0:1a0:7508:daf2 with SMTP id p19-20020a170902c71300b001a07508daf2mr2609768plp.2.1680619023950; Tue, 04 Apr 2023 07:37:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680619023; cv=pass; d=google.com; s=arc-20160816; b=OIK8VBG4RmRZE0s7RNEVw/n8tMe8NBkOrTEE9Jz1EWK+bWy/2Q8oOiDrN8XbWq8LbU L9Pdgw18Vzd4DLtLzUvbvTiEtwqtK2LjFwLg/lmzMBDmYWbOwT/N8CCItf1FEk0qeA+v 2yRnlhh+NECUa1cVBGpmwsLskb0VALGurbo+b9GuYLpcAaJkDi4DaIXqPhvebsyRVZJ8 bxPzJBa1ctwfVDMKzU1v4at40XHuPePIMEIth1Hx4n9tErXq+DSfRrKhUk2ojqHEzGux EeMJ32OSvdSMy11TB38tj6osi3RdEKLoZXmhbbVZmXIDT1EwqarfcayfIAWU4Hg3fkvD BWDw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mxQVT2Lab/BDVcz6BJ5VFF55WIP2l+zcFbF6B3CEPAQ=; b=Yxeq3LaA8oGkG1432KJnls4YAGVSvYYS9rqo49Lk5YnMuBuJGgrUAWf06ZKDLkl7Q6 bEI/zBZeIkyJ9aOsNg61M1JXva5Mv/mmBeRPhimtoyU04iwQUzR3Bzy30xJpVpBTX8sB drf0CxqWfuTy4djOJPtoqGq2E7QLTDnN+CPhnbichwTcakjweTpC0AMbC11Q9JLvWkE8 ZIsTLtUN9wdda27ZZZuV70NezGuU2OHblFDCfSn+BRSJ/YGZjDpm95Mz2B4saxe8EiwJ 4dD3hFSS6qe36wBrZtlN9yOi2w0FmueTvgZ8ozLlht02L5sWn856Ma+BvwJezHpyvhyu ZJ/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=dUyJVSsT; 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::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv12-20020a17090af18c00b0023a4606e410si14569753pjb.185.2023.04.04.07.36.51; Tue, 04 Apr 2023 07:37:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=dUyJVSsT; 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::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235676AbjDDOVd (ORCPT + 99 others); Tue, 4 Apr 2023 10:21:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235771AbjDDOV2 (ORCPT ); Tue, 4 Apr 2023 10:21:28 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE99210C2 for ; Tue, 4 Apr 2023 07:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E1/+KnR2QvyegDH0HqgyL+Cgxcu6L6aiEuBHXs5U93qukMIvfWFJoYRdSJQmhHtHM0PS4fldk4rP1+ghteuve4qWBsGDPP3Blv6QRz0bVo4/bfSxL/fkjci+/G1DzItrfopxBh2gt2uVoeSv7c3jlb7ZrJOHM/feOhcRRng1YS8rDplCdEgX0de6Z6dSF2fCJkvERmHgJHX0MWosVcG6fV6+NEwVct1yOe9ozqyaw0Hm5Umkrfl7Wo/8GwcxTkfZ10Htm38OaGcJqrLHoncFdGbzDuLeHszMnFJMSs7PkZwZoels14ZcMXsLnKLmjFCusH0YmFzc4gm+2pcPqrcqlA== 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=mxQVT2Lab/BDVcz6BJ5VFF55WIP2l+zcFbF6B3CEPAQ=; b=bOx6ZtTT+9UjDk8bP7AkwHHBjJFpmP+8/YL/kxj49qdo0H9JK8U12GM7YimHey6BlCNYZJU794C6UuO4+iT3q3c5Cgw+VIaEPhB7axpfIyQ5M3Z3y5MXj0bvk9NTTg/PjDO187IQqR6yXbvQpCbOyBr397i8loO7EPCIUGuL8RXKcoS5PN36SYWvDxl3H0SP8dMSha362sHXU2GoS/gJ1Nj5X6eIqAXrR2jfQ2/gNN5RwG2hBHYsWxlEikS88fTYI6AiUJWcN507QDrFhgdwM2Mdc2THHXhkn9z9+orR60vIDXIOT0LFf5aE7tr3CB0emtnRTs2a1qR8tViq4G1FQw== 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=mxQVT2Lab/BDVcz6BJ5VFF55WIP2l+zcFbF6B3CEPAQ=; b=dUyJVSsTMvdUfwkmGBjEeeeOHw8FKUWz/8xlinrHlto15XzsR41drvK9iPicUvJLH0P6KFKP46GdQbh1YsFsN+xFSOQVBcCRZoLtvsV027amfa36Vy9LZEP4XfQUsClHnkaHJkOterGdPHf0daDWcbsYoSYQgK2trUCT0dkSLtsPvl5MHmveLG+qVzMdd5rBxKHgjgVJ12Q1yMH4++PIfVhsFeEuxTuXaSigpGsRj7rvo+LqLazQOswwWb+JhYjo+kob5qsQOfVgl/f3aJpdBhsojzrNItzj9wF+eYxA63uRQ7d9Th1iEAaKG40gQZitIy/egEaK0J3sPGZYqUBYxw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4641.apcprd06.prod.outlook.com (2603:1096:820:82::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.34; Tue, 4 Apr 2023 14:21:19 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::a3a1:af8e:be1e:437c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::a3a1:af8e:be1e:437c%6]) with mapi id 15.20.6254.028; Tue, 4 Apr 2023 14:21:19 +0000 From: Yangtao Li To: Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu Cc: Yangtao Li , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] erofs: remove unnecessary kobject_del() Date: Tue, 4 Apr 2023 22:21:02 +0800 Message-Id: <20230404142102.13226-2-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230404142102.13226-1-frank.li@vivo.com> References: <20230404142102.13226-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0019.apcprd02.prod.outlook.com (2603:1096:4:1f4::15) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4641:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c4d76f0-efda-438c-4da8-08db3517dba5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hEigWHB7ymj9FXfc+/MkC+B1nERNC37zygfegOZvqVZcp4YNK6kfw1BCdDpcdAj3003gsoMqyXKfDKmI4Ko9MKhBF1GLDYeQfxMSD/RR1PmmplEAeIYdXQSrYSb5EdRXJVRqk13WO+MeyNCwz1Apot5TTAe4ziaWOY+Pul7U5JXSLDof6OtDhjx7azXnzdQ2H1DcW8QH3QxuHrPg7Sig9tgstNaQTV4YVhOGaSk1Ou2WY7onGNIQRcR6DUreGhRNS0aLRwlXpsLJRppvRlatI4uakggtbXp+rAQ720wADGBDXwbYimN+sitdIM9q6AcUrTx6efvi8v3ZntVTth+1FC33IJXaErSFjCQOy75Ib4lkkpMfWqy0jdcI8buSQYoxOUwa8190WjgmkOK6iPy6O4IKUFQsWQEMaCeUmwimzNueYEltnDpNrYXLUos2NYN1vMXOA3OeaXoLyMqZtYgccWms/pbRCop1VZebfbe+J4xK13Bi1nYU2ePKd+wq2R6dX5tLHYqNn6AlK1Px7lihkXCeAhVuN7FYhzha5kogZLZLSbPesRB6Dp4mK0Vdg0IhOS7jFawZuTF6bxHPLHPj218tspETFQMVZFWr8yVfvRyyW2owASA/6UFu7JCfelBF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(346002)(136003)(39860400002)(366004)(451199021)(4326008)(6666004)(2616005)(6506007)(66476007)(66556008)(186003)(66946007)(26005)(6512007)(1076003)(8676002)(6486002)(41300700001)(2906002)(52116002)(83380400001)(4744005)(5660300002)(86362001)(316002)(8936002)(478600001)(36756003)(38100700002)(110136005)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2h/u2U4diDAUWqIZvttvyUqyMY7ukGVMMnTtgBYaq6lbnUKERwFk6Rg4AC4F?= =?us-ascii?Q?XF9XVxGya7ITOIWPITnTOhbPjuQCDGbV9MVjQE9UJCtZFNcsl8aCSdPJUP3p?= =?us-ascii?Q?nFzFNm/vxCCLk8kHW8Tm9wzHqQM071jNumg5SdLgynlxcSlc9S9ymTaxUpts?= =?us-ascii?Q?ZACZjSO+h+F8/m3WbLzs7MrmTu7BjaumMvvgEBfO1uNbmztiSQJcFa6YwzWe?= =?us-ascii?Q?LSHXzSjZOMXjaP3g+wkjTIuyngcF5Ct9lCx/oVTnuKyvgS1jw7JQ+19kh/v9?= =?us-ascii?Q?ym84z2sLwL660f3DAdLnW4t7sE8obmRgLB0ENUWe1SzMnZk6GeS3d7IRvj2D?= =?us-ascii?Q?v7Ddzq+ZFb2C6FrnE4bGEo2vtUEgeiqtBmR9EYc+7Z3dYkTvCLDjxxqUPjXG?= =?us-ascii?Q?P9Xyvn3b9aum6Ie8hEor8S92Wnav9Twx2sn4KSv2ZQLQFiezoqnuvqnAVMke?= =?us-ascii?Q?V2S/wvQwzj+QkUbjD7zjp0MWOV4x99alum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QqB5vTnvzkV1Ry2afXxCqrQxSgpoRpv54ffT+k/o?= =?us-ascii?Q?TqUYvq9nCI+SD0sTjlkkAuUVnD639kJTDOdk6yqW0li/eifmuOfg+nmrzatk?= =?us-ascii?Q?+KQrCYEztqWNBpkiLfAjbDHR1kMp4NjPIBaXG73bk6IszY+Iix8aRSWeopyM?= =?us-ascii?Q?ciEHjCsJYE0XeZEn6Wn43WGRuXhOc5q/LAObLKGj?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c4d76f0-efda-438c-4da8-08db3517dba5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2023 14:21:19.1068 (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: d+2YK0yB8HhBCuF/nC+WbQlr1kTaI+eXBT3oRFW7VumNJ/Tft+2pc5Wbtv0W4jQuiEfize7Csce6VIni9t8yhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4641 X-Spam-Status: No, score=1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kobject_put() actually covers kobject removal automatically, which is single stage removal. So it is safe to kill kobject_del() directly. Signed-off-by: Yangtao Li --- fs/erofs/sysfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c index 435e515c0792..c3ba981b4472 100644 --- a/fs/erofs/sysfs.c +++ b/fs/erofs/sysfs.c @@ -240,11 +240,8 @@ void erofs_unregister_sysfs(struct super_block *sb) { struct erofs_sb_info *sbi = EROFS_SB(sb); - if (sbi->s_kobj.state_in_sysfs) { - kobject_del(&sbi->s_kobj); - kobject_put(&sbi->s_kobj); - wait_for_completion(&sbi->s_kobj_unregister); - } + kobject_put(&sbi->s_kobj); + wait_for_completion(&sbi->s_kobj_unregister); } int __init erofs_init_sysfs(void) -- 2.35.1