Message ID | 20230319092641.41917-8-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp650927wrt; Sun, 19 Mar 2023 02:29:22 -0700 (PDT) X-Google-Smtp-Source: AK7set/quhabst4aw+aSyufStoRsKDQ92A2abU80mgIHXDaG4zSFd/wpZWRsUrCx2X9Nae9YKf3d X-Received: by 2002:a17:902:d48c:b0:1a0:57df:861c with SMTP id c12-20020a170902d48c00b001a057df861cmr10130334plg.1.1679218161781; Sun, 19 Mar 2023 02:29:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679218161; cv=pass; d=google.com; s=arc-20160816; b=Jt3YlGijoL/1qeHLw9c0kRD8cXAe2q0j4JrgU9d1tZuSZyrPtoftME3BRuq4Eou2iW gqHb+jqdKtq1E2UfRoy3a2cxOGaP4TdJUtV1QbFmPEqt1NE969GtQpkxYVCA8VxVTzI2 itV7t+WPoRBKEK15SqXwf7cS5wmLdKuEOKjraCjz7iGMByVApB3Mqg0P7veKYlfvxViD B5JsOAhxRWY+M5y/But/iXI5R0N6RnDw3pQJYZtj3HI6Q4ZrNYJjPglqMKjsIry3vw90 M8QBNsmMG6tI8BoeH2wrtxA6/zDbOwDaO2dKbxzHe6VCpvScwArAPgJNoF4jsoZI9eDC aRuA== 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=hls3ELBTfAPebu+2KYZozBFgc1+NwXVJaxIp2fmyeL4=; b=ICYNMt+k/1lBnToT7YHUNx+BGyQ1E/5APkPpdxBBBnjLD2IEkLkMA14OOmVd0G+zbT 822XCsxBcQ7U2qUht43CIfIMz8YPVQKzXlZ4bbEjhshNLoT71lxlKRz+Oohx986upHnh +7obl89sk79AmkZ/cB04TGbJ2+oTKMD1Phc9iiqbXekjkq0RWqKGl8iuTfD1CaBgFkbF 0QojYgM2xIB7YHEAft8HCcF4C4NAx1qBq9/Jpdq+zXMYSsYvZYRbm/DZ3q2ZuAelzt0h AKops9EHLYF4+Hvr18mTw0DXJtpIEPRxZi/Cd/Di9iR2/eyUKDzsqk/V3JFk2bF6rOED O/Xw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=AdusP5DM; 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 c13-20020a170902d48d00b0019b7766afdfsi7772325plg.626.2023.03.19.02.29.06; Sun, 19 Mar 2023 02:29:21 -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=AdusP5DM; 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 S229621AbjCSJ2A (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Sun, 19 Mar 2023 05:28:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229805AbjCSJ1j (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 19 Mar 2023 05:27:39 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2105.outbound.protection.outlook.com [40.107.117.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE9F71A484 for <linux-kernel@vger.kernel.org>; Sun, 19 Mar 2023 02:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mw+j7bkkDr7BzNV/FSM3E1G2qrTLcqFhqGjF/WCMBqXlVPft7MhnpfgDhXU1XAlGkEvvc3x+IdzBC/fNKaj05azGGoyookcE2A73WIT1aDgmzkBZ5QV4hphMkchFV2VtYRvTKGhwnfKaZxIKnM4BiPO+fKXwcD8DnHWSDnvFlsi/Kt2kcecfTmYWcDECDvqEZkGzOEf464l7S8kOUkm6y5Ur4qS8UFSamrGUEp7H7jy7fg4W6RojuXZL0TSTC6giBPKaTk1YeROj7VW9l5E/zr5TZncc+z859+alOMIlDMInixtn006cefgiY/OyUmMv8bISmoHJGMFqUjsYh+0nhg== 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=hls3ELBTfAPebu+2KYZozBFgc1+NwXVJaxIp2fmyeL4=; b=oX/5Yvtfo5qgoF9IhN4cv061c/yU1WBJDtj6MGFe0DZLoGrwhMlpICLSfMAYlMTE5F+wPgeQP+hHdjfo20pILdjsXsRhEAu/hGN0duRL4QqYfOphFBWg+DTCQvFGPg753KpXv6J3bKZZHqtIgyMpwnfPWfAynQTL4yxa8E2rYzyrDSKnvsqphSaVXCo0QbOvfo7fxmfLlZ7CMlpxB0SCQ+2EqkwBHG9BU9AxXkFwzST8ZOjOtdvqLMlPiV2PnrfvXfBuOX/fQrnjKTPhqyy8HcKDz6PWi6MagRNuUG1Icjv8/DU1lTu2SNdsqQFXuSzH+SxXVfL3MOU0zXTR7owpgg== 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=hls3ELBTfAPebu+2KYZozBFgc1+NwXVJaxIp2fmyeL4=; b=AdusP5DMXxj39u9WzxW2k06xK+ds6CzkFg5fzaODk4NmnoziZkQq4kairmMkEiqSEGw1yu5BpPTb16URyhpTjaldENCx4NQ6j8TbD0fYHrDw8aSZh8X/XX4CmMC4ISnkO7UuNFBWEeiyeb37YzsEpFR1Gsaz6bbNh2WwT7BazTVJDZhNxI7p4iCykhmMdjw3YZWYJOD4v2hfaOWhxIfnHy9wzPf5CYrXQYlNTOtFMRqehMvw7btPukAvAwmPbQynRZku/Z3r40iD0C/2IFAXv3bP6voDDI6Ysu7GND8fjCFcExYjqko/f3AYI+OZMIveph6XREbDKFtnuzpREwPvJw== 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 SI2PR06MB4012.apcprd06.prod.outlook.com (2603:1096:4:f9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Sun, 19 Mar 2023 09:27:23 +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; Sun, 19 Mar 2023 09:27:23 +0000 From: Yangtao Li <frank.li@vivo.com> To: Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>, Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Yangtao Li <frank.li@vivo.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: [PATCH v2, RESEND 08/10] ocfs2: convert to kobject_del_and_put() Date: Sun, 19 Mar 2023 17:26:39 +0800 Message-Id: <20230319092641.41917-8-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230319092641.41917-1-frank.li@vivo.com> References: <20230319092641.41917-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0137.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::17) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4012:EE_ X-MS-Office365-Filtering-Correlation-Id: 5488fe64-967d-4777-fe43-08db285c2598 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kB+NjScSeuCcXXqadgKmgzjfRup8SXEggCkOBKCYxNWB2CCTjV47KY2jcMT9eVQHUVU5LoWDDw6kkCKXp2oh1eAD7DndGmTSWQQBGVna4hDSczA4ZrNDKA4EayL2aSo/Zfd1DwVP7DF5Hq4pJpDVeAclIbG6l00AdRLW0SPqCOFED83eqq3EqauQGha8wq3Fxk55kzunNNtoj+5JuUANhKZeP7Vb5xGhF0evy1rUb0yjnFutTCDJyvD89ZxwD/lfQ01UjtIYD6N+M8RsRG/7C23nF/eU1i3PadCsarzdvR8VVy845bRaF/kZC44sF0Di+ycDkfu6IkXtYXvEpRdnTcTZEZndCs9C3NgUX6yEDgJZrxldh8JajbrZygpOkHGs84lG99J9Jamuih/LE5MDjeL7hv0zPyfftlBNWzIfNnGsgjD1VmcA2+hHz7LJgwMq58i3hT7tALK/kW5ps8GLHXIW3dYzYkl8cwfa8UtMcDwugIx7rj7DAKjmm6CiZbSHj2nnQ2jw6oNM4isCc6HABBxozC+deqdb3vuBMhDcfrY+/yvkc6m8mr+Y4h+7TdoiCgAsa+VQkSgciFeHETAF/YWZJRIA8Wf9x7u3cS5oilGbI6KHhKcl8DdegoEirYxZ3CRa6IkAzuZYa3ehT/IZN2+ZwG5/57dJ5X2H1UgfflDpPbkxoGOUOq16IdkuSJP7RLVlVkNx8UlHWAKqQ78aGg== 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)(376002)(346002)(136003)(366004)(396003)(39850400004)(451199018)(52116002)(2616005)(478600001)(6486002)(83380400001)(6666004)(316002)(54906003)(8676002)(66476007)(66556008)(66946007)(186003)(26005)(6506007)(6512007)(110136005)(1076003)(4326008)(5660300002)(41300700001)(4744005)(8936002)(38350700002)(38100700002)(2906002)(36756003)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MsMOPiaqI/u31IjWiVCLfrNN6rgv5vXfdVVxDm2FmI23bPXOX/46rv5aoGtvm42AJ6UqXgmRhdT5sChI0JXH4YFnyoK1o2PR892KJZIGZk1/XkLlTslV7r6Q9NIdRZxlUmOR1kgLHF3ejVeC4S3n4OK8KX42soxKcPE4D9r8y9HzfBjBdGIFj8xEwGAx4DXGrpZiw6opxI1rqvJK8zN3IK2kDNYugJhAyneXNj1GvQfCz5lTbNhltrjvM2OgUyzOwmDQQbFu5cJ2DbhrPMdcAfLi9eA5QtJTXI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PW+cIhQkZ/xf4xNSQkifiwvjiqDJTHjjYdPhXmaxxtSBt8oK8YRp+xVZiDcHD8fIb8YryKnzg7QvpUhhK9WVW3rGM29jLOo4VURJUlKEco6mTNv02rBo6VsSdHF7hgUvYNHWOre/0hdDSO/2310lUfa6Gkm7YHjJcYmzOMyyPb9BoHkAzq8vWcm32FHGrFLy06DlFuk8EptsYoQJW7xZ36FDQqU+eBFvph5cKCplug8WD X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5488fe64-967d-4777-fe43-08db285c2598 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2023 09:27:23.7661 (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: w1YrRh/ffdLb0e6vs+HtYh6XCLIuKCevTIpq5Cdq/MEZag904R4IXMGR63SWw3iu6l/I1iKMncwbcqWTV+5PNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4012 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,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-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760787863359137623?= X-GMAIL-MSGID: =?utf-8?q?1760787863359137623?= |
Series |
[v2,RESEND,01/10] kobject: introduce kobject_del_and_put()
|
|
Commit Message
李扬韬
March 19, 2023, 9:26 a.m. UTC
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/ocfs2/filecheck.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 3/19/23 5:26 PM, Yangtao Li wrote: > Use kobject_del_and_put() to simplify code. > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > Signed-off-by: Yangtao Li <frank.li@vivo.com> > --- > 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); > } Can't find any implementation of kobject_del_and_put() in mainline. So I guess you've introduced it at the beginning of this series? Since I can only see this one:( So it depends on kobject lib. If kobject lib accepts this helper, it's fine to me. Thanks, Joseph
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); }