From patchwork Sun Mar 19 09:26:41 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: 71739 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp651536wrt; Sun, 19 Mar 2023 02:31:35 -0700 (PDT) X-Google-Smtp-Source: AK7set9vfdl22SoMPbGTk3PuGBZKB4e5jxtFB61CaWeBdqlFvDQsd6zwwD18ONpdUyv+tE5t2Co9 X-Received: by 2002:a17:902:f9cf:b0:19c:dedd:2ace with SMTP id kz15-20020a170902f9cf00b0019cdedd2acemr11407972plb.18.1679218295410; Sun, 19 Mar 2023 02:31:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679218295; cv=pass; d=google.com; s=arc-20160816; b=H4xxKGEtkeZ6S9yu8Fn3veAXzcrVwvykv7NNh6WLumMPxbmWx7qInt9AclHuEUuxBb g0YTJuOeTD+lJdNO/16W28sFUNQFe/RPJTDlClJkF+VkDswK90hvlhHuofRZdkIZrDVO i9oFLZXDaE2Fitb7Q1MQngssLnX8nS9yJvgs1mTR6H18fW+8zm/x8pXvAU9fjns+bvTz j1GktxxG1UqFFdWlIs4gmobxpl52GSyeIjuijyLZH+yuTXpGrI174pjSmyEFPExjgxaP 7yG65RwA7EhpXkLZfWcSm1NSmxHJQxOe17LTod/Un6lJDpOSzxwCqlFfbnaYLbnjhEmf HUWQ== 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=WayaedDV/a0VW4u6mHDaeEBAtKbErUi9bs6Ndywk30M=; b=PeBhiz3tLOy+hykJhWzIelCHi7ZGSYQ8/yurnIwrSR6Lf8iQsafPe8Klmjf0xTxU/b 5KEvL7LQzT4LkLWBAosPvWbtgfj+HGHGTTKlVufqaKiJI0qpSQDDTlWIFjv4wCXuSHuN BF+XVGXyDWOEluy1Ymz80YBd/UgTMwbu2Qjiocyywmbqi+Qveq6j9jIjzjPmDOMUuNK+ J7Sl1Iaud0UqPRNvtAwCcrTuF+qHAdRBUslKpBfsCIXK2RPqir8nP5qu4aVJL2vOB29m JU7/C7fPKhLLVVqk26X5g426QUCnTNfG0VSCd0biurNTv6HS7ER3B9yhi2PtOIXmTW9p JzNQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qZHbrM6M; 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 g3-20020a170902934300b0019a9834bb23si7025138plp.192.2023.03.19.02.31.20; Sun, 19 Mar 2023 02:31:35 -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=qZHbrM6M; 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 S230225AbjCSJ2R (ORCPT + 99 others); Sun, 19 Mar 2023 05:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbjCSJ1l (ORCPT ); Sun, 19 Mar 2023 05:27:41 -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 DE7D71A48A; Sun, 19 Mar 2023 02:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ccw6RGF0uxbN9wejF3TV2j3VLjMELcQH5HkLawsn1Qqq/SoqjFcnpg62yMerqukBKg93pSrLCJ52BnWY8tSAiOaD6Dl8ytVkl9ulI2zLI+bnRaUYoPPB+28JVGprwIoHo0lWLH5qgZ6ISghrObjossKNDc+d32+vzDFEAzrhk+7uqKFW4QA3Yv97gvU9Xo+vLgAmNkuWtz5NGWIKhhPsHa0HHedXRWqrRUhZl2Em30unzxGFa9eBmN3QUb3Gunw9AqXeL4AdlzcqzGnrtnwnVbHPUhHi2493UZoAPx4DJENtZL4PqS20Lh1pXAzFhpHNQe8tIzI5VOM+Wy3QrCE6iw== 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=WayaedDV/a0VW4u6mHDaeEBAtKbErUi9bs6Ndywk30M=; b=lk/aARJfKX27iDPgz3QWQuCnuE5004PyMiXkrIfVFwC7+sYxLDYVa1ZzNf+pzurkQCNypAuZbtFNDo0B/ub53SgGKFvyUILKZXaKQglw9C3TCZMOTT2YAd0rgdSu5GNtNMD8vA4vaDGXF730wlnBBUD0eBad77yCE/ZOz9QVJq7WDjyWOpKwMVtJtM9JVbHW4RVg3JRu9EdwdAh2eZiOjqwlGvN7IQTvcortOhTywLzxHu8FjwkQ66Zr3nmGNCGHWlkWzGc0kS1p1WGxCecrbRQtHMl67CzpaZ1ESXfrUUahMTMcL7KxXDxVthJzbq7LvLPSaKRzzxcBUnfP/DhAhw== 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=WayaedDV/a0VW4u6mHDaeEBAtKbErUi9bs6Ndywk30M=; b=qZHbrM6MC4YkPV/7OmL/AH5SunaCkm92WJvCbppx3BV2kIJDFZXD5UTuBSJSlzebklcSle+h+3iOBOMGOaIj1gk2tGHjAQp1VStrgD76cCNQ52mLJLuO8TRFiNyXqqxjzaSiUloY8ZjF2RjYcUFgggD+z9GEckfJxw0oCstsexNdLD2sHlLFTNtVRM9XYHMEqktHD9a2bcNirBdBVHUnJcBSVKZ7QxI1hTXUNwDmz80dEW/UrgmaIZOlVg2aEc0l4M000srFoeFkIu7vKnUNPlc7+4RG9r+sh/VhnBVtkqXchSjCAuyThP7plvHuHZQB1u7ujvbACR9LXTym9InJCw== 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:28 +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:28 +0000 From: Yangtao Li To: Ryusuke Konishi Cc: Yangtao Li , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2, RESEND 10/10] nilfs2: convert to kobject_del_and_put() Date: Sun, 19 Mar 2023 17:26:41 +0800 Message-Id: <20230319092641.41917-10-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> 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: f4c36f81-8d23-4d9c-eace-08db285c2828 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OPm+CE1yA+rUlks5zQOuJyGghzCNqQzo5mNHzRnnqPEWJgGULcRkG6JK1BHHEYHF+zQiF+fQUevh4eaJIoIVG8WehFA8Iaxn0emWZ3VCk1vzpd+K5a3zDIFVOE/epDvY94QXiQc+HKfc59AKqsD61dpNTyEhNJ1dNG9+watc4+4hHta25vfcUwY+CDKLAMbNLv/ZtNLmpxLJQTINCkca2MuGgTcc8V7k5AL1Hmt11akME34EKizZFv8TXCL9UMutRADlvymBQbjUzCaehv2deLy6PvGmhxoCMAoh1bXbhs0jsMDxMRZYi3VQFYWyPECzgG9EPz0E+1LpYl3EDs31jLiKIQGuG0JykhbSusEKAMQUfuUAMDBrMehAuFhk4OLN6h8dXYMLlamgGwLw2NozDXQoPmMh16KxbpQOinXPtmNGVZaaOoVIdAfCeh8vTu4pNNH/W5nb+gGqKLoSeG4ex7DN8gLKeT2h0rZAUDjE76+xWjwm4UGwfk05hLemP4+B76+Ka6ZWLG2oiiNHzw1eWBrH9xL0LS/2C0Wi0QVw+rbpJxrU7o2UrUvPkhVfGToTYvX8X5hutDXRu/8nTEQhQzMgghSl5pIPrHXAFVUAc+kQ/UnEo5/M4cQtj5vywJaupR/MzwZ2bsR80wmPGM0NIFwDzs5+SsYEidSCDn3DC0mEBjKU0VH8EMiY33jaktG/scXyjJn/nh5wxGo/fM/VcQ== 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)(1076003)(4326008)(6916009)(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: kDuZT7jHrtsJoWzE3R4FbGm3SFWkh2Kvc5tddyg+EYu3P5dsCPAOqr+AESpfqd2RIx28S9glt1+QvMdnjkn3AOTrTDYeCGOQj88/U967FBFkO/t2jRrfDeC1Q4zf9JFUZRj/lYCkfLHtBbXVCQ3kJMLdxZC/JnNC6ItajrkPDLJHzpcU1CDfTqAstseaMhjAu/YUHJsnQA6ZEdoiHk/MaHmxVLaDdXOk/4QgvbKL/tzDWPOgZS3olJB0k62dDrBM7BMqyHMC5IdkKm05CcS8W1ELpNqaAf4fuqdPloTo/tyX8bfF3QrVOczgM8jq28vstKP2En0EiBU28KDYfTcHkam9YuatNCEhUYXZiPREFkbAgBEDZJfHGc8iXMPyu386fPLkmmurG+PEboHqMOgCDx6+pOV2GbFgdpwEKQ3R3hW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1YgL1+70ifYiiM9TnvfxJQ9z0Ff4C3xiqXFYIVUgp8zoqZUR/bKOxzWi0H5+Gt2AylQRU8xud7eo7/CQsjkyvD0uzxl X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4c36f81-8d23-4d9c-eace-08db285c2828 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:28.0471 (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: ay5qR4Lten7nu/Fk8tdWxNOUUyHnx2hMHWwUzXLTAp10urSw7jGJVou84gShBYM86CmeO2FUxAOhNAsXB5O+fA== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760788003617989163?= X-GMAIL-MSGID: =?utf-8?q?1760788003617989163?= Use kobject_del_and_put() to simplify code. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Yangtao Li --- fs/nilfs2/sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c index 379d22e28ed6..150965d58ca5 100644 --- a/fs/nilfs2/sysfs.c +++ b/fs/nilfs2/sysfs.c @@ -1042,8 +1042,7 @@ void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs) nilfs_sysfs_delete_segments_group(nilfs); nilfs_sysfs_delete_superblock_group(nilfs); nilfs_sysfs_delete_segctor_group(nilfs); - kobject_del(&nilfs->ns_dev_kobj); - kobject_put(&nilfs->ns_dev_kobj); + kobject_del_and_put(&nilfs->ns_dev_kobj); kfree(nilfs->ns_dev_subgroups); }