Message ID | 20230322165905.55389-2-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 j10csp2461738wrt; Wed, 22 Mar 2023 10:18:17 -0700 (PDT) X-Google-Smtp-Source: AK7set+pqBM7OzrlKBzf2t76GfMgoKHNzuE8stXxH30G8LJjVmVaO98kVm86vq5N3GnEMczpEMM9 X-Received: by 2002:a17:907:a090:b0:93b:68a8:a0e0 with SMTP id hu16-20020a170907a09000b0093b68a8a0e0mr3514551ejc.16.1679505497352; Wed, 22 Mar 2023 10:18:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679505497; cv=pass; d=google.com; s=arc-20160816; b=BCLDPJu0E3IwC5ZrKKfB5GGyhjPaJJckfkQCJckJnFSO01SiWm8n+XOso5TVgNejeW Be4thVtGpKr3mkRusxvVi+QUUeRqNz6d/f36Nh0LcCDFBS9USGts0UQcc3Eom/oLDKZb A9o5ecFa06VX0NZLZjeFXpuhSdbphePzP2XKqu50ljfI1d88gmPXtL516m1QRDXvj6HS DMSJEy9BwGlPfeWlDvXKnpp8X0Gdr4yDz11E2tatffS5lE9lYpNK2YbmG+Ruc8hPcgDu eSfjvln7/0MvnJAgy+QWno9OmTUrbzkV8jO/91Adv0rx5lMCfCpAT3AOQv3+EzdCJ0+c J3GQ== 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=Gi/SB7uU/Vm7xG+VaANHu7liHPdOo0JIwPJ5priBNiQ=; b=iED3Pwj+V90HTcqpxVXWuxkAOKOBlkX7fF8Brsj1ya5dxn1XhwUd8PZ2i0ls5GM3sr rd/Sclli3knQj7J4QFLRhCTUuPtQHyBGCS5bKn4dRBUT14lit+ihOV0O3OjBtAdB5UFm W4R8DBVp/Qi0+gnuQlkSNKTLEHcAUGUdeNo8QpYRskM0LIOGvsla15DCtt/26wNGM5GO +I226B/98aI+UFVTTDcX10OgIuZz/X73mRSqr7e69MLt7aoZkmQIuI3qOjEz+FjLDLIZ 6zT3DO+A0cZ8pkfgGXL9u9qFle3p6SB9oitNxcLqAmBiopJeCf6sSi3y9JE04D9d9YI1 Vqyg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HVVPnH7y; 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 m9-20020a50ef09000000b004ad71106d26si16740351eds.60.2023.03.22.10.17.51; Wed, 22 Mar 2023 10:18: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=HVVPnH7y; 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 S231288AbjCVRAE (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Wed, 22 Mar 2023 13:00:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231340AbjCVQ7u (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Mar 2023 12:59:50 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2094.outbound.protection.outlook.com [40.107.117.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F39B28D3D for <linux-kernel@vger.kernel.org>; Wed, 22 Mar 2023 09:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cWIMsgH/aGCG5e9bEXCJ6cvR6R47MEPVzFH+c41MxgvdhsicsqpxT3nFbCoXuYJd/W5hSC4yILjeID7St8qEyKD6iuDmYlc7gkGE069AUkLeupUDrxhl9eYdJuVcG8g3bzd4jIjHvs1jnWiPpmMEmInqUybo9gu8g5ba+YoRyHMueIPyVbb+vJO8dpfVfWiiAM75/m4D+eTNsSvGP05Nih35m/CDHh359fBujI8lXg8oJW4i9Xpygapklh9zpRbQZPNwgo9Caz9NXyAZ+mFJZvioXtVlxGiSeNd7hhbgAKMQeGrnD428cn6QEAxW7dKgYKxVvKVl2+Y8SOtMgPi46w== 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=Gi/SB7uU/Vm7xG+VaANHu7liHPdOo0JIwPJ5priBNiQ=; b=L2t4AhjOdoKEiuApLGF9LCio3OSWfV88LssMYhpL00xf63P9v4dIADiEL7zE6mru/oJNJ+nrUPpzUL4GB+lm1a3cO97Qy8Yl0x/SjamSksG507hYToYcBJUdOEedQIta0n3zWB5dDLv30e+9CYbghFYZrPDZkd/hxnETkuzk5a0JK1+PIwI64ingHF4DJSo0c4fdCQoOjvS0ykWcL55hkSqZy9EBtrX2ATMnRpcQDjqJig8HO4Y/8/Iw19bqNWmHVRBCOvm4JZ+FOk9zKX0xokpyJmggSTVv9afqxIdKoGgOUJXIp91dgaAWdnDJfL0kHsutZZOEiBgtVXKqaPCR1A== 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=Gi/SB7uU/Vm7xG+VaANHu7liHPdOo0JIwPJ5priBNiQ=; b=HVVPnH7yU1fLqUyEUsCqiSbJbTkHQV/Tumis4/OgV+ID8z0ETAMxmb5SSSuG8su9SW5GZg9T/dhqbYUu2RQNkWZuUqlRz5433oIpXHiNgywM6YN/E2WHynGP21CvsAB/oKIgNPpe/+DhBzwnuBOCgvF05nwf+SmqVhLb4C5wYEuUZz7i3wBFdrXPbEFSBsd+85bM4K/lWhZhfUFdUt3wypoOPVjnaea/18ntRw7iE7+AWs7n9sjyHa3BAkh7XlecC+1iofwdeqvfsJN+tbSDnSQp8cRrNOCgwTq083x1OjULMyxNruiGSGgnTd5yK/JcIyUhehmSPbE1xgQ5WlBFZQ== 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 SG2PR06MB5238.apcprd06.prod.outlook.com (2603:1096:4:1d8::8) 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:34 +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:34 +0000 From: Yangtao Li <frank.li@vivo.com> To: Gao Xiang <xiang@kernel.org>, Chao Yu <chao@kernel.org>, Yue Hu <huyue2@coolpad.com>, Jeffle Xu <jefflexu@linux.alibaba.com> Cc: Yangtao Li <frank.li@vivo.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Damien Le Moal <damien.lemoal@opensource.wdc.com>, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 03/10] erofs: convert to kobject_del_and_put() Date: Thu, 23 Mar 2023 00:58:58 +0800 Message-Id: <20230322165905.55389-2-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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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_|SG2PR06MB5238:EE_ X-MS-Office365-Filtering-Correlation-Id: d89c2428-7efe-4647-4dbc-08db2af6cfd7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ja/Md3+4XLTascUojIsAaH/+vXNfWIetuvfwOmkzlURwjrymUGX4zXbUz9qT8+TudtumEuvALlbIZ9s0zknm4jX0WnEJnTRnSdDt/SZM3J2+kkTk11x0bPJKLI3rVvNj1hvZvwK2aEN17OxZkpynL8Wmoy3QKRDYxX2uZodPHP//Qr0fuqcLN9GYuIiguP602AiAZXu3i9z0UCmBk5mfqHebyhI53SraXDMkX6B2BInZAEYo02CleBkPo7WjvFEI9u/eMmdUzfMF+JNSLuoc6AP8aIaIDwVM/yZiP6++NTEBobFPvkfEBLVNkaU0if6rWjV5ou8RKXXvjxGerSVzltqU78Ro9ahvq/wcvLOTv8KHGxS/jdJp1C89fnFlMHR1cEpoBzzYnE34W25JCPBfA9DUo6jw6skPj3X4L1emtX3rTQMPJBGg3sHQ78jSAlRadUeuYmdCuZ+1a4E3ZYp8eIbFsQqpShVFuRHcx5z4NbH2EedgxfAJ8Xgi5advVocC1MQ4MUS3C4wwxOherqzFNOfnTOyblNMX+TrR4+l8mbPQb8RFMG5Om8YYv+mVARTGGutng5tC25jgjuT2/qLm/YNcYXws9mG2hAloZC/4MU8qvZW/K+AxJh23gK7wgh6E1KktXjEKCFXSrav9o5u1SxprfBRMEFiNMnaNgWPbtJ1su2nXEcfgvqGXDhNRotL4sIxLsBSj/IZzu7MASujT1g== 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)(39860400002)(136003)(346002)(396003)(366004)(376002)(451199018)(2616005)(6506007)(52116002)(478600001)(6486002)(6666004)(83380400001)(110136005)(316002)(66476007)(66946007)(66556008)(6512007)(26005)(186003)(8676002)(54906003)(4326008)(1076003)(8936002)(4744005)(41300700001)(5660300002)(2906002)(38100700002)(38350700002)(36756003)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6PMzENuswHEjU5t/l9xsPxxaa868TJMzYdajTv1mTyVu9UxS1ukDTLkyL6OvYTSQcMrwmTifM/mcpf8pkuNBmHIsRuQXG4bNmBK7yiZVu0h9wnMw6q9j22OZwXI1VMJ214DtxtibCrd9GRzRNiTSOYcJdPF1eI7OmGGPQW1ZlFD8l88DebS6RPSB+dj3yZ4tXzCNHeRh64fkwSClZkHI3WdLxXS98CrXQsHLhKnTw+HAgrsjS95NFKugAzK9kn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EWtq5d1jZD987IRWxZAshGNRq6PajRSJyTvhpWWyAUdkda+ua11cWGzEauJkarv4UEAPa0C0Qtrb1hf2GXI1bsP7dYmzDJXSC5ivmAv8jYN+nW0yIfxSmDHHSR8rUeH/8hwTv7/FmHYcl4l4pX1iXiK7tcNRfzfppPNVJPMqETLOUuaCN+TSg5qiE3KpR1FtJLqqnP75rvyts3wT5ox8RIaI8mlJzgEbilSS0u5v58yXAX2kUIrfTCemSuWHWGn8QF2g3lj4bJTN X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d89c2428-7efe-4647-4dbc-08db2af6cfd7 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:34.3509 (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: lz9ovNjaymPachLyjewdT90IjkHX77kfsey2EeFVRaqO9xKiu9vVgTrtVywED52BPulRWHfo+RoamMWxeD4w4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5238 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: <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?1761089156322727180?= X-GMAIL-MSGID: =?utf-8?q?1761089156322727180?= |
Series |
[v3,01/10] kobject: introduce kobject_del_and_put()
|
|
Commit Message
李扬韬
March 22, 2023, 4:58 p.m. UTC
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/erofs/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 2023/3/23 00:58, 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> > Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com> > Signed-off-by: Yangtao Li <frank.li@vivo.com> Acked-by: Gao Xiang <hsiangkao@linux.alibaba.com> Thanks, Gao Xiang > --- > fs/erofs/sysfs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c > index 435e515c0792..9ed7d6552155 100644 > --- a/fs/erofs/sysfs.c > +++ b/fs/erofs/sysfs.c > @@ -241,8 +241,7 @@ 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); > + kobject_del_and_put(&sbi->s_kobj); > wait_for_completion(&sbi->s_kobj_unregister); > } > }
On 3/23/23 01:58, 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> > Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com> > Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c index 435e515c0792..9ed7d6552155 100644 --- a/fs/erofs/sysfs.c +++ b/fs/erofs/sysfs.c @@ -241,8 +241,7 @@ 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); + kobject_del_and_put(&sbi->s_kobj); wait_for_completion(&sbi->s_kobj_unregister); } }