From patchwork Wed Mar 22 16:59:03 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: 73545 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2460623wrt; Wed, 22 Mar 2023 10:15:59 -0700 (PDT) X-Google-Smtp-Source: AK7set8WwvOtJ7t7WGNaguuRvU9FCjnu3qqHOA2zdtavUbgpMaOQgmymPCvFlmAEaHigiDkJCxl4 X-Received: by 2002:a05:6402:415:b0:4fc:eb46:6b63 with SMTP id q21-20020a056402041500b004fceb466b63mr7294568edv.17.1679505359212; Wed, 22 Mar 2023 10:15:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679505359; cv=pass; d=google.com; s=arc-20160816; b=piojB0AsnsKBMIdl+7JwtyujpStPcz0yvdMnPuP3g3KXZRUPzFMx+nLCXkL7MV8KU7 bugILG0yy+yi8f1qYipLGrg5IH/tLTMUYXA5YevC2C6M/L9+iSUBhPJ8p62hYGo0z9F6 9eQTyui1RpDqI2UR2cm+U7ddYIaGjZ4Uv9Ih+NF2DOopjUojgk9odjBHzi2nONcoVuJe JKoscwD+fpgK/vMVSZDTuDe94lOl0ER+yuhaW9Sbg/yLcQ0d60iw2X2+e5i2jthTNAIu YoMPIo4YXeAF3yX8/o3IxKC/HOHyutpgCm2SLm/T7W4ZUjacc5RPMhw1BrP7K9IlNG/b XXzQ== 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=pNtRww3+WurnR/ssb+TOIf0NNF1vkQf8qeCiNRBrFJo=; b=WviguvyAs/B7LEmYsvDkRsZhkPYJumDI8BRmwlVhIOykKSzWDAoNZXHhe2yzg4Cvna BaPEeurIEhXfCDCqMRZ5jShshJk40mCihOVfCZDQPnxpmU+qCNQ49fj7doUZxl8awfzs KyHMGVKT43Ja53Maqap7tL0zvW+p5hm374WDZAVOYTEY/UV8lcpBUG51fNmlyfyEV7Tn I6mr1qhi1xZsiPx97irjosK+8q3qIQYfV8FxNi/FHBa5lVucmL/w1YA8Ag5qcHloo9wR NYSO3vT1mqhFQEcYqjeScvxH/HgF/ukVVe9+1RDsiMQhv4+KG/3F4h4dhhTDNTa0P+53 r4WA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=XE3ghHas; 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 i5-20020a50fc05000000b004fcd1adbb05si14806418edr.210.2023.03.22.10.15.35; Wed, 22 Mar 2023 10:15:59 -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=XE3ghHas; 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 S231326AbjCVRAi (ORCPT + 99 others); Wed, 22 Mar 2023 13:00:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231319AbjCVRAJ (ORCPT ); Wed, 22 Mar 2023 13:00:09 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2121.outbound.protection.outlook.com [40.107.215.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B3DE5F6D1 for ; Wed, 22 Mar 2023 10:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EsMaX2Ln0gYXXnjF0ga8gs+GXleJJK4l0WAIaoA4t0U3ifLGRnY4O4phXxKDgkBuPBtTRnAqWiuBQL8yIyU/fqjDdd8obOvcef87CYTXYmyxvg6yYBt4q9P5VJMWDAn1R9X1DvD5Ame2A4RAqlVDz7S0NO8y2XdBA5TLJnK0ZjvvvxAVawp/uRNyp3bp8trCR7r2DKzKh8hDEmXrgLr8pUjXRC/hyo72YepqTVGPs2jkuVG7wi7XRElc1Yoetx89R1/2eqEdLGoHC470Sh44yfmCw15aQqjv6zcKmzAfwFgkhY9IRqh2kKSeJWBNSsUwRhsNulCU3ksdNh9DhNJw2A== 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=pNtRww3+WurnR/ssb+TOIf0NNF1vkQf8qeCiNRBrFJo=; b=k/SYhU3gLi0qHoKU1TXGJnvg7/nSZ24jc5nEzXCVmfZ0chm16oKfAC0c7wKrEwvPHvOuSfCum7S5A5Y37aLV9x2abNEKKORLm14IfurjrgPUYTW+n8ElYdF4zydKPT/HUrTiDaf0R/xGhnWzVzd0JE7cPwTam6844KdEb6vEfOsAFVTYxD/q1IRwfV7iRNWe5eeKF2VyAg+tbiUlr/54VXZzaSMC70OdJCw8hB25+RYvY5xnEuy1vwh6++qKJXruuZ0YaW/JI9BwJUkeqExsw0VD0oQp48QR+6HgPsO1LWfmim0yggUUymfbLGm2yFI+P80cgQ+ko/t6uLs59DinWg== 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=pNtRww3+WurnR/ssb+TOIf0NNF1vkQf8qeCiNRBrFJo=; b=XE3ghHas5VmID4ddZIi6bW7Z7mU5WN/ugus7njcwadlqp4TRads8EjFFplE+aO0mhfeenX1jyQOgTs5CZZkP27s5lhBPDnumPYMlcsjOPLpyy2++7KQeCzYOJtA4VaWp2NkKRWPIwS3DwLbW1T83RL5/7q4sQks0g9hiAgLxqNwQAupwa3php+iTpnDYvUOTELF+auI9GtNSDLkPhHiBRWuHs3odl6WpmELt/Wgx6v2p49nS8jiBZAz3+Wb3FzSB333EhxSszOJ9BU3liZDu52+raLyLpVHgO9U6+9ahNwMkybVEtTCpEzThoFIfANHeS5U1GYqKO0+zK4bTByaW2Q== 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 SI2PR06MB4107.apcprd06.prod.outlook.com (2603:1096:4:f1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Wed, 22 Mar 2023 16:59:56 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869%9]) with mapi id 15.20.6178.037; Wed, 22 Mar 2023 16:59:56 +0000 From: Yangtao Li To: Mark Fasheh , Joel Becker , Joseph Qi Cc: Yangtao Li , Greg Kroah-Hartman , "Rafael J. Wysocki" , Damien Le Moal , ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: [PATCH v3 08/10] ocfs2: convert to kobject_del_and_put() Date: Thu, 23 Mar 2023 00:59:03 +0800 Message-Id: <20230322165905.55389-7-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230322165905.55389-1-frank.li@vivo.com> References: <20230322165905.55389-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0012.apcprd02.prod.outlook.com (2603:1096:4:1f7::8) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4107:EE_ X-MS-Office365-Filtering-Correlation-Id: d746dff5-adf4-4331-1bd0-08db2af6dcc5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pkDIC8842PqoQRUBIHYym9rii+8ZFNM7C7EYGZCPuyEDSdmNs6huNFAyw9v7yGp5Z34ImpDdWTGHkDyH5uQRUZu16SRMLxPk/sby3FicdG3ebwSAeiQTl8MMMwzi63jgKcaEEjMubbsv264JGSVUVFB21gQQWyL/p82wGGx7TeaPXf6G41Zzb3MUKQIw0GAQPejcxgVhTBT/LksgzSk72IxstEaBeVcsUpkgRsr4/DDxhErNPHzMOC5SCdYgQBrYttUX3vtfQMxODYbX7lkzX6dolycIX1XL/2xE+RH264KTDIrxtztTLbwJfkW+ukyUkbHqpSTRtNX0rZBglq22b0y5C85MLzGzmdGHGiY9CcJR7vLg8moHQKnrEOsZ46RdzxYZdb3fBMH5i8uPS1j7d3Yuy0wtmbCzc6Z8/IJ4EdnEThZMTRd5++Fnz7otGnU7GK2ORZFIYzG3d+vZ2fIbrCdQXKYmXT9s2qvD3kOR93H+EE6JroLl9oq97pgSGcp/yJVxH7ZP+8UNr/y57LTiyTDEpb6o1m1b9VyucRh5E6xFyWpehhSB4zQmgx8PvWSkpTe2DgyhE553osckoUnFuvAMrfGG7G/FOw4P3lXabUceWi6q4J70LQTR6C8920MxPAJyKaAe5zbXuvlyDIfiQC9bEQQAU5FyxqUkE4ZKp0+5pPcYug/muJa055hb2GfJ50jah7vAtuLlyA+D7qWFag== 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:(13230025)(4636009)(396003)(136003)(376002)(366004)(346002)(39860400002)(451199018)(6512007)(2616005)(6666004)(1076003)(52116002)(26005)(478600001)(5660300002)(186003)(6506007)(6486002)(83380400001)(316002)(110136005)(38350700002)(38100700002)(86362001)(8676002)(66946007)(4744005)(54906003)(41300700001)(36756003)(8936002)(66476007)(66556008)(2906002)(4326008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: l1+S78XpM+CouZwXt1Rk4latGQCVLb076NKHd2zuNPYX1hdzVsV/ZWJHVZZ+FF4UnA+okT9atxx0BDVVrwnSxh+X6SvJm0GSarID8qfoev9QUn+jVZJBSfxTdPy2hNw7WJTib0woPJTWDDYXY9fY8EyO7sN6tqwDpI5z7KuclKwL2eROi51wFteaLQ+tPd+6y19SEzTo/rtil/yPs869jPM4GsW7/8Sn8N/7fpVw5eeRGlW67GEoPSBS3TWlv9W3IV8bhkdZXYSuzVh5QMiZngPFh2x/9htmmP9egBJiBESTRE9rOTgG94kmv8CtK4dl7Ssl8tTJ2BSrROpsr3BgJSAp5YFCJSzdH8ffg/i1VzciKpPpBl8JvGTlDdUGAKXDAqmJDw+wIsIveUT5EdMxsPiYzJzeWDsEomru8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eW62COxAKc2Zo5xqzyhGqPmGVqKP9nutwmxTixXamDvBjQX/PpeMHoQ1tQ+NsM2aosrXRfnYbSahAQr0JIzcN1F6QPBYbbSz X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d746dff5-adf4-4331-1bd0-08db2af6dcc5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2023 16:59:55.9783 (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: RU8g0mPqti4noxp9nSPQB0Hjooh+40B+95jx1t/IMrf1d7CeYJUgXSjwJPGzDcsH4tspViaxVh+fb+YCL6FySA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4107 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 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?1761089011420264462?= X-GMAIL-MSGID: =?utf-8?q?1761089011420264462?= Use kobject_del_and_put() to simplify code. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Damien Le Moal Signed-off-by: Yangtao Li Reviewed-by: Damien Le Moal --- fs/ocfs2/filecheck.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c index 1ad7106741f8..fb9cf601245b 100644 --- a/fs/ocfs2/filecheck.c +++ b/fs/ocfs2/filecheck.c @@ -198,8 +198,7 @@ void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb) if (!osb->osb_fc_ent.fs_fcheck) return; - kobject_del(&osb->osb_fc_ent.fs_kobj); - kobject_put(&osb->osb_fc_ent.fs_kobj); + kobject_del_and_put(&osb->osb_fc_ent.fs_kobj); wait_for_completion(&osb->osb_fc_ent.fs_kobj_unregister); ocfs2_filecheck_sysfs_free(&osb->osb_fc_ent); }