From patchwork Sun Mar 19 09:26:38 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: 71740 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp653399wrt; Sun, 19 Mar 2023 02:39:41 -0700 (PDT) X-Google-Smtp-Source: AK7set/pF7PDSXr1+hqlQC0NEp+EVeRltOdq+MK7zqU7cmgj0Le60yyAoJpjQ22r/hClsPNJuC3Z X-Received: by 2002:a05:6a20:8417:b0:cc:cc27:9185 with SMTP id c23-20020a056a20841700b000cccc279185mr17780806pzd.50.1679218781652; Sun, 19 Mar 2023 02:39:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679218781; cv=pass; d=google.com; s=arc-20160816; b=KuW8BzXCL2YNKC1jqWMVrh7E0ni3eRVDJe8VylBdCWG++RX64DiK7TU131PXyYoXzk LUctz/u0k16yc1eizFacZ+0q7Ks3XqXyK68Rujd7+YndvqFvk2OHy6oj5lgAzB1HQUBB ETMAc3LW01BiXGUf6nVKnndEin/qQGOhCW2z6SiN0PTrt3I6mlT8JuANlk3u7S9+nDYn lSnsz8UXCVQn032h0SgfRbPXE8fn43Fnl8zzLyGtQ0e+VuzTAY90v+ThanGuoQ37kcbo xocDQjIRWAGuY5pFV4sgcfi5vlfrhtK6zoDgsrsgYm/V5cR7r3LzCGC/bw2bDLHNaXw/ reOg== 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=uOSp+BJif7DZNfqGwNo0uxz7Rp6qR7QtsZhgyfaKHS0=; b=BDTtPRrSX363f3/KSwEih1FOAETshiPvDifWDkTZ7tM68g7wxflKRGSVDD08vj+9Ur IGUVX0IeNbAv0RsGQJpyZ8COb7go0v4TgFjvN00NPD1nUdonPBAkuSK52mUwzcNMNi+h 8xnrydtpoK/l8ruwmbFzzrCspwpwNMhiXAey1WvA5BHgskIKmPyCC2gjqFtEtWdFNPBK SDf9MG2Mu5qTm5V/UNyLOyPIwKnkDuIadu+V2316xwBDU351mqnw9IugA8lDOIR7k/tR rVpfgsHjH555GS0CUVPih/QOgQGmiv0bm2/QExtZ7aHylXvKmI6R7s0eA1g6N9EWhLgL PF4Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=N+VfLWI1; 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 c25-20020a6566d9000000b00502fd84427fsi6987711pgw.482.2023.03.19.02.39.24; Sun, 19 Mar 2023 02:39:41 -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=N+VfLWI1; 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 S230160AbjCSJ2F (ORCPT + 99 others); Sun, 19 Mar 2023 05:28:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbjCSJ1j (ORCPT ); Sun, 19 Mar 2023 05:27:39 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2123.outbound.protection.outlook.com [40.107.117.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1441F1A4A9; Sun, 19 Mar 2023 02:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mjRG3VCnZepMrIWi0ZnIB1zlCRea8h9vRc4HLxcGXNEu2Oup/IJbs84KMJaz3hi3qAmhazsGO9spkA1RXTNKZZhs5hxlMFMuVNWqxQstR/8n+gRnn/v4AcX9sxIoZQCkBeRjFf4wwkQjBkrG45yQ021DrIFAjkdiWbqcNg2UX3iJ+jyBRXx1BwocETgefl3tWV33RccF0QahHNwGEXMclF0A875ApKo4bNDthHxZQlFrX+PnsIwqxReXpBDS323lA+9lZE9m0WSTcX8pCskqbv4NcyL5noQULts2EtV7NgMxTcCIMRZ7tSU3RywAjskPLb9pui6r8KYoxOyUJ/Of6Q== 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=uOSp+BJif7DZNfqGwNo0uxz7Rp6qR7QtsZhgyfaKHS0=; b=S6g0PrnkJC2lVko1s40Sm5mZXIzUKy3CUs1gG9m+PkmSwULau+EuwKzyiYkeex+lxON8K9z3nQ/q9P8sn39sm6xWVxQsmFxK9QrdzbvwwwHbZXpJdiVTpNE39xP5ff1ufWv762J/UGbgEbydplBikrgI0T1hjt0LeW8bJau5O6Z+trWJdgJM/gnmzA1Dpm3NH6KsXLfU8jnirrz9wRCUfe5xisiXgS+xbRSh7PLibDGoMqhFiHZkSS3i93NzkiT7FhAaLAM32YuG2CbYDNDx7zalu+/XMGX02Vdf4SDJZx7B/KL9w2akDxn7i2w0aNXH4b+31HXvN/Ui5TspDahrxA== 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=uOSp+BJif7DZNfqGwNo0uxz7Rp6qR7QtsZhgyfaKHS0=; b=N+VfLWI1bbYoDQ18JOFHz4mC+EJzApUaVU9Km0qem3ZyP1NG0aQdEaxTXLTg5hlhhy+KmxoNyxozzxwUdCjLXUUpTvsfy5pIfhUKMJ+JTqzEsB5VdB3Tl4ZxLof7V11KfEQqUFItpbjWJz5D+p10gq9KAP9Td07fu3qhfyFv+q1+LnB/f/Rl/MzGiM3l9xuxgqWkRFIuBpq8FvlQW47bl5PhY2yyEoFqft+4lRgH9N84ddtznJkUteGS0VzfXQFmK1HfNOFl2wzNpbdifOxh0j95aP4/wIi5/oIO5ICNRvmCFXhDlfXKMIBx65qzwle+5aXZSj7poDHyfXNW+UFpKw== 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:22 +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:21 +0000 From: Yangtao Li To: "Darrick J. Wong" Cc: Yangtao Li , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2, RESEND 07/10] xfs: convert to kobject_del_and_put() Date: Sun, 19 Mar 2023 17:26:38 +0800 Message-Id: <20230319092641.41917-7-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: ba4d3692-bfbd-46fe-ca72-08db285c2448 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WqCf7bgT3615EQMexCaRiphIMCssX4CiRjz0bbppti/v945gWHQoby3MiWfFSNLtDO+3btzBsmh/2mWYT9jN1H1NkVOHbOHu/UweTwX2JrC5RNsbwcueMs4jXWW7XjeXs4Q9kcHcSzTVriJZvTg4hn50C4+EQLJ0i39j/iVYp0rVfHkb9G6ThxFzwYBINL7X4A14XrGTDO/N62WPbM3yZDJUfqQa7Udzdw5AXNI1XiSzoTsO+aciOJF7PZ41cTdIdcj3o6/hhI3vuMqVZEwo50KNPbUBDCWr4xmgs7RdT88/dO7MDaY87iUBLqZhKv5FPnjDFOjua7RgLZ6ykfMYyEti/iWr3T2qD5F0zgphpR52prNMUP8m6CeZJx1q9lKr/ysiN3szQLaTRMzMQMc1vGy0djKh9guz3rvShR+4jP4oQ5CVhbf79+1Jf17kuRa7RilzZx8+Tk+a7rn3bfCF8YkEy8a0ZEUnNQbS06jcKXD/92FVSikU1PRl5VRB3x7gJkZmPnMvzdxRt2bJSU4uI75+Jsai3r2CZemyE78vWWUmtpwKNbDP85VPZC9aU+muhyjKdn2rmH3noz/oOLZfW3BSztw1vkE8wb1nttfp+x8IoiMm+ZBj+PEcMucAIAjosptImGQrL6gfXb+w93f4kDQVCAHUT3oJFVsuNCko8oz4ICODn8rAZcK/M6Bbhya72AItWYnXx8CYNRNRBRgZcw== 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: myITlizxOMNexpKekaTOBHwnG2Sj9eAOa/6DtqAJAG27mEwXNl0NINdUKOp9LqxdhChq99ZVS6xj1sFZznrE2ex2+jTYnjOw5ELPtE0mi+bYRZWWRqYJ5c5oJojhDBx8LsJY7lihv904gLLGWgtlVu1EJnU7INWcVhUdsXYEjxQjQo08t2VHV+GtF1bxhch38o8qg7G8GudK1BR5MUbQqN0ckMB2aQMAA+DfJ86VROp5MVeAbz/QraItqIoz/a0AybEP72u/QJonxCB6bXRRVZwswaWfXsA758n9EWLN2GKsvho/VpYoTY/x4zZH9+CqPsZ8hYRxaAnxzs+Yg0LWZquroKQIXwNP7eHbPWE5WXNX7YLBR7t/boGmbKshuGdjNsaJ/ZUB1RgpjpBvPfssEH10F41Vyo01M8dyZeZs3B1j39m23c3uSMP3D+qHdY6T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qV+mWXkqVCX7zUUFfflCMIsA2dkWLFmORvwEfo1b6knaZy0sM8USXmnvSNHGUg+ERHxi5 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba4d3692-bfbd-46fe-ca72-08db285c2448 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:21.5471 (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: grKAwbcWeuZ8b74RUuylqaN4X9yfChIhl7eaWIgVpRWhVqArnGZeiytvGhQ7EQTkTnMxcdlvKd6KKA+KWehI4A== 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?1760788513061242675?= X-GMAIL-MSGID: =?utf-8?q?1760788513061242675?= Use kobject_del_and_put() to simplify code. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Yangtao Li Acked-by: Darrick J. Wong --- fs/xfs/xfs_sysfs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/xfs/xfs_sysfs.h b/fs/xfs/xfs_sysfs.h index 148893ebfdef..e2ff063e2c29 100644 --- a/fs/xfs/xfs_sysfs.h +++ b/fs/xfs/xfs_sysfs.h @@ -48,8 +48,7 @@ static inline void xfs_sysfs_del( struct xfs_kobj *kobj) { - kobject_del(&kobj->kobject); - kobject_put(&kobj->kobject); + kobject_del_and_put(&kobj->kobject); wait_for_completion(&kobj->complete); }