From patchwork Tue Apr 4 14:21:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 79200 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3111345vqo; Tue, 4 Apr 2023 08:21:30 -0700 (PDT) X-Google-Smtp-Source: AKy350YWL6i5bBazx1Eta/truxTmPcpfBwJKzjg9fpjhJRmU1MtXxiOU8X8Rje/3wE6PjUxqqJ6I X-Received: by 2002:a17:90b:4a52:b0:23f:6830:568e with SMTP id lb18-20020a17090b4a5200b0023f6830568emr3427020pjb.8.1680621690336; Tue, 04 Apr 2023 08:21:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680621690; cv=pass; d=google.com; s=arc-20160816; b=AJBA+OyLmf6/pvR87mrudsf2fWxFHf5ZUgaC2My1HrEFofcIwsCVkAdNEGTErcgxxY UeLdUe6oKcikw8q0pOnjWUUjiWxwnVdB2NjtucZjbxeRikODsUxdbWROlKf09KhJBUly dBsz0Hctty9JKdVIcDKaBIQ+9tYJLuVwGT7NDMLDWvFJ6uvYJtFRdI1Ql7wi+Q8k+fG/ 7qnRVho7Kk7voIGkfk6qd7fPKBW8r4J23vrSyBzPJgVX3ujOb+beDqKRCCFq+554s2Q6 pFlcJ7zUWR7gFiNF3D4AQBgl7bTK/FLKe2ZRO7PoCzHo+746iFiRZaY8H/x4EabWNCNY q8rA== 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=V2f9tfY40vk+ZqB6BUcSXC64efgvRPll3GdNVfQ5m/8=; b=uF6CVWJ7qZCuyKn719TZMZBX1ZuOlfEixf7KxID+1x9nbqZTT30jUjMkToVaV0B+lX DsdM6ZijqYoVsnyu8VADVL1z5MX7twuMNg3j7cfTvCtE+/ZncXg+xZ6IOsLtlWUC2ZNx +ZBYbuDjKIWMEN9eqHztSjJVGBPVV3xnt7wJhLq+obHM5mJMbTCKBEAGv7+Zkt9Ry7Rm xPugxpYJ3kDsAHfqJcMZJ7GuruKdlEMn/1KS7Ln5XHiXlVbw8JEZUFMN+auq/tbM+jDc TasV/zjNfzg2h1PmbT7jw4OU0zpEWNT8m+SC2BeBt4GUTmLUMX7Bzrx91WXp4tL3vtWY zaCw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=K9kEG0gx; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mz20-20020a17090b379400b0023d4d532a70si14853849pjb.113.2023.04.04.08.20.51; Tue, 04 Apr 2023 08:21:30 -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=K9kEG0gx; 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 S235753AbjDDOVa (ORCPT + 99 others); Tue, 4 Apr 2023 10:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235728AbjDDOV1 (ORCPT ); Tue, 4 Apr 2023 10:21:27 -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 B160326A4 for ; Tue, 4 Apr 2023 07:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQylciV6GG2aXlq5XEA9wiHUuQqQZRbdrg019EqyHijes72ko11UUeTS1oN1A1BSFgoE9WVkrT8qCqBB/kwdZmV3V25JzMvQr2dTrjv375JYiOVJ2gg7wCWkDS7ljEHxY2rI0b56Fd3R5yoM4fkaljzE+9JCJe3jfL6IGTJ4eknehfm+cmbK+tCzvjhCv6FShyaH6R10u22R8SMLLl1K/HjbEQ1l8EcFtWnW1xdi35jJpMxiwJa6pjnWOROG0g4H3YbrQ9qxc2JCOOrO1VQ+JnH5MvOeZlzWkmsUAZIhSWDykGaLZvFIJYHC+1plnEKb0873i+9cEMQHqlZJ4a1J3A== 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=V2f9tfY40vk+ZqB6BUcSXC64efgvRPll3GdNVfQ5m/8=; b=h19BuRQ4n4UGxSBrck3AeA8GsHULqc4uAmXtrT0D3jtIUwF0z3YVw/pruksPihkJ6H3fiSC6FO0lVFgZBD1sS+qGtbTTk7Z08Yb/kAsLQPvDPiL6BeAwBOPDu32GV4aTzw82WOMaPJOPrLMya4WM7X8KtLl0h6KTRBUh1MAT7MjLibmYI+MZfG6U07Zo69SgjWGht/ZrhjgsJ6WznJzi/huHpjFEXOVQaeTQT7xuR7pltDnib1vjKeDc8XZTPCEi8EtiFnEBnvrosB5xacnXUA2dyViaxlCanXyRuxW3aK+wWtsKoHcPUwkimXRI6uAtpCVQl7gruqZoFvqNx9EJag== 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=V2f9tfY40vk+ZqB6BUcSXC64efgvRPll3GdNVfQ5m/8=; b=K9kEG0gxkTCe/RBIoNBThbgo/f88KehaJiYhNy6GdLRAnr/Ls0axKJGhbc+h4zWL3AbTDjoJFsfk7uOSvCp19z7UgDHC9xCJxLO5BhMd6NhzygM61dl99vR2z2uL9n7GqnXgV3pm8iLW68VD/SDJ1AnJJM/I29qTe5TqpEb2Tqh44tOF6UikAFr0gzMGpLYblBTxKXZU/+Iietj4DR87b1BrwAoi+GyeDndeZOhtSrub+HMnfRvkhVQpMwESxYgaZgRuGcyeTHaUvoU0BkjscH27B+UgFL1va62Hf647kqUbrQGf+COdHvnXrItNrSkunEq4E9LPs+4b6Ts+hlHTBQ== 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:16 +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:16 +0000 From: Yangtao Li To: Jaegeuk Kim , Chao Yu Cc: Yangtao Li , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] f2fs: remove unnecessary kobject_del() Date: Tue, 4 Apr 2023 22:21:01 +0800 Message-Id: <20230404142102.13226-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 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: d21be895-bf05-4f64-0b92-08db3517da06 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VER9UM2IJTnpKd4rLlRB1QcSKUcUU2cZA64KWk+hcFebgoRcsV4gbCIotRKdtIEkAr7Wbx2n2+bmKE+Dcz/I6VqEP4P61tIY6W3S6rKUYbBoyPDup1DBG6V1hJFvO40fs9nPkwiQjI85Sl0oUppFps0G2T45GT2HRxxnaK/Xq6fU+V/gtfaK6gonkty7pDT95tQXw49Ko8LmZfmhknvzfVXE8cZYH43Qo10SrHa11uUoLzZLiKk1V6vCSkWSGDlfwkiiZ/n51CPe4LXH69NiGG7lD3asF16QiTsrGbrTNZeRGF2kn2FPxlK5UpT97jWRI98pa60bTDc5I5cR6MQDh6PKjlorrQxT/H1KS68g30cdjGSmYLI2guU/24o2GiLlqFHpqLvJVC+fuTeKXDDiRH4FE0FoXKRd5ANPiS6TtVPDYd0NdzJFLwWuDp3BulUzUZOlaSWCf7e+Li4qNSfXxtva84EfITZn0LO+tMorYc1Nw1+zM1PAxFdqaEybqBR4Cr4khrDj7N73N0sBwVe1kFKuGCvGMSZx9wHJG7dkD6qMsDW3gH+KZlSnasp0mNiWEzS2T//v1MvyFYMyf7266c/8fmSir+XXL9VQPpMa1SAb8v2UT7+7xb9dcH2j7V/8 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: rRSsgMtlERLxe57+xBJyCSFxe8dh9u8GUsORTfTAgfDtb825VDGZzL1gYS8miElLefQwhlBIL2imMUKHMA+k7sqicew3RBWQNi81gvHBI6CpaGZ5WO3r1/uW28rq2gzousBXcLH4I8Ez1gqVwtG327R/F+gAsh8jVCma3XpRSs6s6N+z1u52wLqbQ0csAg4eeUORNhHLUJTpFbPimVFbPMzvQXDR54RAwU+UZiHtPujd+JpW/Ifxto85h2KEhjZvx6/oUA5dl1FfE31mMdePYSkTw4YcKDWl4nS+fX1kvidgyxG7U7FhHz9uqLCQQeC2zZRHQ/A3pmzibD++JHj6ISTZD0k/QKBIUa0OV9tvkeluZ3hd3cwZXqX1y/lN/BBdwuOU9V0O2PR+1Z7Bh64boLY5UfGzUtqEYS3Y6RG5xVD2u4lMv11mFdNzPR0wkmnIgvwATEK4ciwuLX6Eykt0WhRzKI1Gc9a5rMeL0WfBuBmx8q2jSfC95rYMM1S4oXs11ssnXSAZ5zNxAQeirTP3ck55mMifjny8EhFJMpfwJrhKputT2CMdJZuedn3fCHwF68Bn5DiI9PrzlWfvtXR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92-08db3517da06 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:16.4194 (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: lQkPSwg74eB+FTt4oyb50mADa71HGUwSIou3huvrs8pkJ1aD60iCJkpP7w08Rvi90dFnRJ9vn6tYJeBdbeS/oA== 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762259569332391448?= X-GMAIL-MSGID: =?utf-8?q?1762259569332391448?= 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/f2fs/sysfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index dfbd17802549..d5712627fc96 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -1472,14 +1472,11 @@ void f2fs_unregister_sysfs(struct f2fs_sb_info *sbi) remove_proc_entry(sbi->sb->s_id, f2fs_proc_root); } - kobject_del(&sbi->s_stat_kobj); kobject_put(&sbi->s_stat_kobj); wait_for_completion(&sbi->s_stat_kobj_unregister); - kobject_del(&sbi->s_feature_list_kobj); kobject_put(&sbi->s_feature_list_kobj); wait_for_completion(&sbi->s_feature_list_kobj_unregister); - kobject_del(&sbi->s_kobj); kobject_put(&sbi->s_kobj); wait_for_completion(&sbi->s_kobj_unregister); } From patchwork Tue Apr 4 14:21:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 79181 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3d4a:b0:114:e959:cc0c with SMTP id b10csp2993950rwc; Tue, 4 Apr 2023 07:37:17 -0700 (PDT) X-Google-Smtp-Source: AKy350YsfqrZqr4et+IJx3rYLjLRnlBD9MHAcrKJEMMi+oW+klE/CaB6not6SiE0pHfJ7FiIb3um X-Received: by 2002:a05:6a20:24a7:b0:dd:c5cb:ac86 with SMTP id m39-20020a056a2024a700b000ddc5cbac86mr2187247pzd.41.1680619037239; Tue, 04 Apr 2023 07:37:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680619037; cv=pass; d=google.com; s=arc-20160816; b=uUImUyr+P3N+m+sUg2uM0hmsPdjeUpwoSwc2b9ykoRFoLVkM4pWxFml6BEONJntTsA jCwQZSeIrDbza7a0NstOylZuUcbVfieqBVTbQoWvUwOMMOtOp1PpPyOOZBUgkTQPulTo cDsuyOw6OV9n5bvmrya2n6g3KH+8PGn5CXYlfU1rshMfMzKuYlFpE6oHiadXE9i7mVwX o3so3Qb+uDqZnpG/T9gKILY5TgostyEPbNiN8D7fM1W49rp/YOeuIq++BbWfcV8NDD1r xmqOlornaB7JvgdPYEG07f+3kKma5fRRnmmmYBP8J6zSv4WufNAPmfUlBDfxSjeh3rG6 MNKw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020aa797b2000000b00624ac1abef6si10596658pfq.218.2023.04.04.07.36.35; Tue, 04 Apr 2023 07:37:17 -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 S235728AbjDDOVd (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> 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: 2h/u2U4diDAUWqIZvttvyUqyMY7ukGVMMnTtgBYaq6lbnUKERwFk6Rg4AC4FXF9XVxGya7ITOIWPITnTOhbPjuQCDGbV9MVjQE9UJCtZFNcsl8aCSdPJUP3pnFzFNm/vxCCLk8kHW8Tm9wzHqQM071jNumg5SdLgynlxcSlc9S9ymTaxUptsZACZjSO+h+F8/m3WbLzs7MrmTu7BjaumMvvgEBfO1uNbmztiSQJcFa6YwzWeLSHXzSjZOMXjaP3g+wkjTIuyngcF5Ct9lCx/oVTnuKyvgS1jw7JQ+19kh/v9ym84z2sLwL660f3DAdLnW4t7sE8ob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Ry2afXxCqrQxSgpoRpv54ffT+k/oTqUYvq9nCI+SD0sTjlkkAuUVnD639kJTDOdk6yqW0li/eifmuOfg+nmrzatk+KQrCYEztqWNBpkiLfAjbDHR1kMp4NjPIBaXG73bk6IszY+Iix8aRSWeopyMciEHjCsJYE0XeZEn6Wn43WGRuXhOc5q/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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762256787990363574?= X-GMAIL-MSGID: =?utf-8?q?1762256787990363574?= 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)