From patchwork Sun Mar 19 08:41:33 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: 71728 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp641064wrt; Sun, 19 Mar 2023 01:50:40 -0700 (PDT) X-Google-Smtp-Source: AK7set8dXXZcjXZqa1+f46js4edX8VSvmoZlu2UzW7KTIibIaDNLL1tMhOF1rQwWJll0+3x/hjGX X-Received: by 2002:a05:6a20:8405:b0:d4:f98c:8678 with SMTP id c5-20020a056a20840500b000d4f98c8678mr17404406pzd.19.1679215840161; Sun, 19 Mar 2023 01:50:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679215840; cv=pass; d=google.com; s=arc-20160816; b=ieb0FSNNo5KGcaabN8orX4MA3pAo7CUzJPA/W9Gol11Y2noDgSjIHHLTObolj5l8GH RYuRVLY3C7u/61czlIRlcW6zxYUeIkXp88eVqxxXnK7qvhzlvfec0Vnh4oXLL5qBPEOR MzL1aEvl6GVDjydMuwjnGYzoC7rS43qwLhys39yOxltOVgXw8e3jpfhPc7nWT6uK+l5d 3Raj0zR52rbAI9n2xWDQXVB94JHZgfttqZt9AeOOgk1smiWtSs0tBEnP86RYmIxG7wbs 2cb+i40Jr2DU/AvI5Tys0VZk3G+3oO1kWglzTJLqcK/Dp1azM9qYAn1hapukAvgbmtAT HR+g== 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=cChoitUiIc7ttW7uWFlm2vga0tLO+9+UHdJAAvZFHvM=; b=Dq3yY/Aqql/MTInSDOo02xmjJc4HFDvtdNnicl0xA3ySQJPZIQmIUDUikTBr5njTuc raBsPHpdvmcNC2HeX73xEbgmZIVZNRe4m7bSdxSDAAxynoICPlhZT9ic6BvrN2RLgu9X jTNZKGUkKQue0itl2O6gKsy1ph6IUuh1sAbk1Q3JJbBD7RNsIIf5HSU+smaJZO+BC7TX jWw9XQ/aD0YbfLNCp4yaY3S+BQpTWsKOjT3N538qeIIHN41Y7Y+6erHuwfftL2JCDnEc 96tYVUccOiYd/EDyeyUvjMfNFXyJFJs5F8TDisXrqpDod0rReAMbvxHztYacpe8VdVC8 Y+uQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=E27KLRg1; 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 fc5-20020a056a002e0500b00577c17000dasi8017850pfb.166.2023.03.19.01.50.27; Sun, 19 Mar 2023 01:50:40 -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=E27KLRg1; 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 S229541AbjCSIni (ORCPT + 99 others); Sun, 19 Mar 2023 04:43:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbjCSInf (ORCPT ); Sun, 19 Mar 2023 04:43:35 -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 8B002252A6; Sun, 19 Mar 2023 01:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VYqkh6JgdJdfkS1T2Txg0RCOc/YPsA5SfaCviQtKoGRPiLPGJk99PThdmdNQHTloUik8CtCnh/cEqnO5B+PfeOwq7ltMN9vb5OmParfjgw9KErJHfHQjHh+DUOjvdT5DCKzlPkEg0u9Xgk3E7mQ7jNF5W9ODgfVOdO+Tyzv2hMkszn0bzpe4T2jXwDeadtTHUiT0TIj3YF7gKQp94hhBPHx4s/KWkrQZ8cDtoUpDbte0igGKQHdwhuDNJeIT8rpLeKWPFqc2TQa7157V9DX8XGAr8sQdXCS2bsFTRrmRF9PxCzHcu2cdijnl/MNPgAuYDtZfXiMjsMaAkrIeTsP/GA== 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=cChoitUiIc7ttW7uWFlm2vga0tLO+9+UHdJAAvZFHvM=; b=kQhsZsFbZccJ+AzyDHdxJ8n088gHo6xI+6cbyT2TTVGOZmMbTOU4ALs2gQMEE0DaG/DHHUd3Rn/dmC+HqsIbJT9oAgyY3zrhoq112xBvzB8H1ngSZZ+nkdHqTiNfgd6lpUadFsc4fzR1Da0MPQGRcF12f8lP24uMjt4127waVzNc86yvMTyE88KE0qF9A/oDRKljE3nabg0FT/09WlQ23fXHvhU9obNrWS0nedECjJYFvQ04jABy05b1VMgFyl9J365GAO19KeWQcxlDOd1N84Qonwhvp+61Bp3enavnzWSLczzVg6gRCrk5epXXkxltOtQsbniporJUaeiUTk3Brw== 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=cChoitUiIc7ttW7uWFlm2vga0tLO+9+UHdJAAvZFHvM=; b=E27KLRg1vYqXBeNlHnnsKgM0JBaVJSmjAfOD0IVf5RHuVkWska+N1SOFrEz3mQdV7lASzjwEZlwSAUWBM5vrs2q+G9Yq/ljWpqaAzqDsJC8+7uD1TXim8UOkcpBOMHITFY8eF51SO53bN0LM0uEjTAZo6HTJL3eu2s/e0cfvf1yUe1p03M/LbPEbDk0C47HVhQaONYx89XjXQHg7Mql3UJ7xnIcx4o7VcYnFMl6lwB2qFRe6sHj+IUhZ94Lu2+Sxf0zzqGt2PlHi+c8ukhG5PVvpug5omqgVEpfI44W8e4rpmHOW/bC2jDrMe2oPLi+30jdryjvU6kcKkETcgwPvHA== 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 SEYPR06MB5350.apcprd06.prod.outlook.com (2603:1096:101:6a::7) 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 08:42:11 +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 08:42:11 +0000 From: Yangtao Li To: Ryusuke Konishi Cc: Yangtao Li , linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/10] nilfs2: convert to kobject_del_and_put() Date: Sun, 19 Mar 2023 16:41:33 +0800 Message-Id: <20230319084134.11804-10-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230319084134.11804-1-frank.li@vivo.com> References: <20230319084134.11804-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:195::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB5350:EE_ X-MS-Office365-Filtering-Correlation-Id: 0883deff-80a3-4d5a-21b1-08db2855d4aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9tQJ6TyvK3AiKHSk3Dzc2aQ8Rg+LVOvteoyn2hKAMQt/Nt5G28c6njLYbnJJccrw7hkBZvnk8A6JkL+SdeT1dPhdaTjsh299mBUABN8T9p1aBmlX2kDaGgKLpJsnGRifvwMWz859BzZDiG03chQTI1Rn4sX4gvllUJzDaHXqpjBN/kfZ5Lf3zCFb+QUILNTzLMg9dD04s3b7wThEiDmTLNxmJVhNBSmgRAmg1mforF0/uo/mGG74B8t4bybustsJT9UB3S0vCu8MHVf3iKXWntnqF3v6F9yov14f9TPka+PDZKMigzyVhU8mvzcxCbTCka+jL5+G3jZldJE8FAqh9aEz/ubowamc9tf8vRGISzy1RJID5Aa1cWVdLzLL9nuGKPGo/pGD9QM1hfhu4GOCCWFnR2RDiwzegOCc/B5LqIxRMrF1LDHtyBZD+C6NoydxK9ATLpLIi1KNoT7uFjGNy9XIyMVhIudzqRtfj+KFhvrJBej/RE1M4Zsgi+MSlZboA4H9/VoiT1OpRcNEltzQuXrorRGmbhYXRLb6Jg8f0G1gGZXUHipMcbTJgi8HCl7UKqJuHgzRDEWggzT9BhXZjOHpJ1zwzDmy7Mtejm/MxclfknlQKQqzm5/oXnHtxxiWqr3Mg7ccjKqNPzhNe+Uy8uGGhcaUQa74EB+w97vBnuWxqk2ozFKpOYFHun9eCXpWSJh9vHWTPPd53tIDnq5GMw== 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)(366004)(376002)(346002)(396003)(136003)(451199018)(86362001)(36756003)(52116002)(83380400001)(316002)(8676002)(6916009)(4326008)(66476007)(66946007)(66556008)(478600001)(186003)(26005)(1076003)(6512007)(6506007)(2616005)(6486002)(6666004)(38100700002)(38350700002)(8936002)(4744005)(5660300002)(41300700001)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H45Y/t6ZQbRdqBZmmfZcK80JUPFT+Kg9FwJ1HkPKwSD9YVgeLj2VA9cfgjYm61gkodR42qy9gzbUbulWWGRCaM1HoUaR45x3k2cFVL0WRVtX69JrFz+zlDTlcqWTEOMP/5cqGluZraK+UuRkP2j7Azo3Zi46IP3a04XtPARx+cTbcRtdu6iMr1nmKUYXWo9DZ8A0+XZOmpUDkcZOsfGB3H0ZXEddWBhRzUmV/3AIt5uVWBohjBfLIqql/HJmESw5/U5TYZl7dx7eGe+yHY2i8NZJrmb+oNLgfwTRTZiHhaZqa+dr2D43ubhkZJWJuDuxqQPryiOzrecclBG96jF93h3Ef0VBcEkPzwuLQ4HAupxjgidgFjMnse9rj4Ll+QT5OMdefD7wPD6SrXNGCAosYLFuX/dN+HV00/b8fkxx0JBZvCZoPi5pepRG1AW0gFoKOZwRVK8I9wFNOdZWXADZ2CiwjE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/ZQfYlMvr1A2/qYaHIOzrlBKUm7J+ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0883deff-80a3-4d5a-21b1-08db2855d4aa X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2023 08:42:10.9869 (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: pHCBz4j9iikHHooq1EjijmaCVEFoMrJJVjVTCjO/TR4ZUxNYmmUTHsjRxZ3VN12gsVgrRZvQNIspolLC+fKAjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5350 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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?1760785428791294764?= X-GMAIL-MSGID: =?utf-8?q?1760785428791294764?= Use kobject_del_and_put() to simplify code. 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); }