From patchwork Wed Mar 22 16:59:05 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: 73546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2460814wrt; Wed, 22 Mar 2023 10:16:23 -0700 (PDT) X-Google-Smtp-Source: AK7set/eS9KoP3ntKITl/vgqu7hThfnBbpOWtwD1e/qk37ftdQy4Cz5B/moQRqfbJbFH5s6EnNs4 X-Received: by 2002:a05:6402:3450:b0:4fb:b09e:4c8b with SMTP id l16-20020a056402345000b004fbb09e4c8bmr8255164edc.37.1679505383416; Wed, 22 Mar 2023 10:16:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679505383; cv=pass; d=google.com; s=arc-20160816; b=Aj3a4SauI4sh4tpORvPsI2esNKlvaUKYG9Iv1RneD+6aYPD49IUDqO5mU+kn6bl3d7 dLTAiXdVQYzpuZxEujH8FBC5UKdfbm/BiVOyhkPEAG4RBnSIRwa2lcsnv2Tj0+SWoB8Z 68uaEfot/HO4fmK6i2mnvy53lOZvhgd6ja9Q6qXTkUoruApnAGvNZ6WyuuU9Xdz8JxlP r1IoMmXUSTU7vLyGffIskClQdQPSYCkku/p5VUXHZqbAsyeGbpLVle+nDSzxtfjoBB4Z WDbNOq7T8rs5CAZ1mSHyU7r6cxDrapTc7snMnhJZoTkmyal5VKDsm4JCsk1V7FTNpBpt 6t5g== 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=YeSXbiSKn/Htu8RDFyUlihMaEwMnfwHjUTJcCENoL/A=; b=fBQD5sucEyG8SKaRUyPBPoi5rXkNbXC94LZNbYzOOBYR+svdevxBITUPV9ffKMzFOG dGM017nCvVpO9wpTZUNFbayfbjSgVRW39slzEMkFS9f0LIgT6D2f98yTcmzWgPdoG6fd 8oxR22q2eiZzuVyFuIUvT4lPMx7eis7F54Z5wUCBFBMpFDJlvr6zCOyRT+vJLeTZGxwv sMCfUKr85oJsN021SlUNX3xXaPchSKsiLSCgEIwUN43Lx0lPVipSVqVsFA11hf0x2Vh7 q4mIYzIgxpAfIlqUf+ngsKUm7XJ8fepVb3cbXw54hvtRZaqBlafkrhzKGojAcoM/7Goi eKmg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NuhvGdye; 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 m18-20020aa7c2d2000000b004ad7c7c307bsi9723657edp.567.2023.03.22.10.16.00; Wed, 22 Mar 2023 10:16:23 -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=NuhvGdye; 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 S231379AbjCVRBC (ORCPT + 99 others); Wed, 22 Mar 2023 13:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbjCVRAi (ORCPT ); Wed, 22 Mar 2023 13:00:38 -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 BD31A64AB3; Wed, 22 Mar 2023 10:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AijP9/6n0Sh4f71990eolgyE/Da8Ej4qTK27NEy3yu6070fVfSu6ZEyS6LUO6leDx2b87M9yjixiJWP13gdPlNala7OGazmzgQZa98Wyez2zouXvfe/RD+y1WPYNOX1CSqUQoUMZ7BQM3z6DWz9aCU5O6Qc3b0n1446YpfrsZOrR2HqGqpPSar6tf0+Tsh0f+zXPLu9t5XlzH4oqDZlHV6DSR7ZrPtATRjGIFfmCl5rTiAeJ/WTHuT2Ttg+9xi1MEA1q0iljwSKf99d7RbuNJUcjowSwHfliQ1UG4wcrkAKLIBAohUcPR2z/TON1iaRx5/wYSAVvkbcUK+1/9wCWlQ== 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=YeSXbiSKn/Htu8RDFyUlihMaEwMnfwHjUTJcCENoL/A=; b=E1PmTaysZZN026cprB2n/gS5WhUNVRlVd8ftixWusp131km4RJonbsipxFyY0TQiG6j577H4sAmK+FhGST1EvI+68uU8VJHRNb6hNAIaYxZt206Es2TrKfM7E1oQ9g38UvlI5Z1HZw6AvZixj5VxU3pk9k4HQzLC5WjZ3mUBCoQXDSEYNV7emy9kLr7SM02+Kgu8Mcf3Z3ZspT1aX9Fpn5tIABKHEjtm27hH5VQtb94GswriQeQsYUBi3WaPJ7AekYQp2Qmq8EZDQRiAWIZ5GTvh6WX4m5wvpDHjOInfh4nR4/mOwWrEdSyx2RG3fOddLDvrhfO+JYaHLMdhpIt1ew== 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=YeSXbiSKn/Htu8RDFyUlihMaEwMnfwHjUTJcCENoL/A=; b=NuhvGdyeKkkSMp+Z62JFUScTXvDMRB9XyKUOpkU91HY/zlVSteoNvV684AqzMiT6PQ4kdwT8Sz3zn8K7avLMed9jhxUaNILeI46p3TFWJQxswV3B/cMgTN6AnSDGrjnkWuuS9RJhGfHCEjJhZf3LNIjVOKnykbmLdX6buFdN+qAmLG9Gi9xCQGozHfInbbgJk+5lKDajr1rxHF5+cw3YuS+YgYGGNYlXqn/pmliFzetvZhDRjxPlKu0N5RHGIbCaeXU5XUC1qaMvngMVB6yaqLY7h+nYxGkg+8LTHAVL4fHPIgnoFrPXEIMJWpN9g5wqkVk8CL4+r1qmh1VFhsNzcA== 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 17:00:01 +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 17:00:01 +0000 From: Yangtao Li To: Ryusuke Konishi Cc: Yangtao Li , Greg Kroah-Hartman , "Rafael J. Wysocki" , Damien Le Moal , linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/10] nilfs2: convert to kobject_del_and_put() Date: Thu, 23 Mar 2023 00:59:05 +0800 Message-Id: <20230322165905.55389-9-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: b9d1b65a-5fdf-4db2-c118-08db2af6dfce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2AtLPt6UJCvLwVPA4XrSajMoeBeHt7ieaqSPVD/F9jnQ+igEtxMAGY1Uvhzj0Z9tTJbURXoaGAgdXbU3h66Sbw82DwIJ/kPJSvhALeTI2N2TshzpDD1h+SX7wbd5NMxu7/36yZQmikFCDqbuKDn48B/fcz+CWNceeZTVX6MSINVigXGzMVeaSg2UOSrGwZ9ZMZ5OfhmQg9BZvQF4BllzzsIhW+g3x5aEutwDWuF/15Wbz0ZNiC+3093yv2+i8jsUGeiWydLZcm5Vw4pemXkAa5mzf4dPQLQeOvuKc0UsJ2BgfmXudNtjrWRBLG6JZS+LGE7jcgpejGFNxDIaVAItpZMBfHZRe7/8gU8kOGUtrq+qngy/NhAFikU5vyZVXDwzMIHYb83oXERms0kV68//pL8OFrZAymN01PgZOUKtWEmc/yvKnrdtjnd7/IgpbHRge37YrN92owZA3QGILa9V9W+raofOJALJRTwbK9NOkZzG/bgpujsZIWDXbETHWlBlDBtUnrdS7ACf+Pop91qgnfKpdhb6UH+0D83Upjz7uhKI7Aa6IBMmars0+6xSXqNXjF8RHhwWAvVqkiDOwpy4aZCVn1c+3Jm4O4d8oY7yBQIgsQtZ8hm1U4259c8urVBSCirbIxdlp/NPYKi/IJKdyrw1aEJjYPdtNa62B47BFwxF9AqoqBZk1665xk3/J+Z6OHt3E1VevBdJphqBrnep6Q== 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)(1076003)(52116002)(26005)(478600001)(5660300002)(186003)(6506007)(6486002)(83380400001)(316002)(38350700002)(38100700002)(86362001)(8676002)(66946007)(4744005)(54906003)(41300700001)(36756003)(8936002)(66476007)(66556008)(2906002)(6916009)(4326008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NmUFVd3EVSrMCT62QQ+hjFuFvzqh9L4ERpJJnN2UcJBZYdamb/sgygGBFQOYpJFzZ+kzdDM90OuiejhcvZwBm+pydRvwlTHr2RIyuEjoATV56Gbp+B3TSRdwxhfbdMSOsuUzUzBrAfiK8eT4Uqdqvv3VHewvs3QbfAI3EYlNBMzR8HH9xPLMnhtf3iwn91lsiYPwPIV3mFDdFJgJJqKPZ0b6IpIjONFjC9xfZI5WLnamWw4PB+tW2VNuL0BbYlNhL0ybyM/bEc20SYydVrowLpSFMcGY/zSgb+seChKcptGFty3aOQpRh9W+60etwUQNPjwcHxNkOyIFKLMaIvtK1uQ5JCirWCSAYofiLq5JCt4PUVG3UpbiHyWHbVv+krpYOhc/DfnQRsJf+XfskXGxsovGeMzVe60t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11Q1YlehX4Y6F33MYO2gyo3Q0D7L4yUs+x5n9WDr1A7TOO0cvrImQbr17OjGm26VgNLm5ZS5CuZMqjZmNh2onAS9hxuZznWFwA+F5ze1hQbc3Z2UU2VQS X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9d1b65a-5fdf-4db2-c118-08db2af6dfce X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2023 17:00:01.0903 (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: nuzlIMocUqG80V+U/PIFblVG0Ra7ILsk/1FGRvzUjM/M8HSkBq/kdaO9DkD5G6CE7U4G/+ydixbQB0Ik1JUG9g== 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?1761089036822783471?= X-GMAIL-MSGID: =?utf-8?q?1761089036822783471?= 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/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); }