From patchwork Wed Mar 22 16:59:02 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: 73563 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2462247wrt; Wed, 22 Mar 2023 10:19:27 -0700 (PDT) X-Google-Smtp-Source: AK7set9DJgccdpRVEXB9KeR2+yGqD9Sj10eo+HodT8iGHqeCvMGrw/w8phkl069fD62LCvQbNmFT X-Received: by 2002:a17:906:646:b0:8a5:8620:575 with SMTP id t6-20020a170906064600b008a586200575mr7784514ejb.3.1679505567734; Wed, 22 Mar 2023 10:19:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679505567; cv=pass; d=google.com; s=arc-20160816; b=FdHwcBq69NOrWtj//NjEj1avP+sNZO13K4wOYBhZBdkKUZXtrIc8n9RGb+DauQCKNj YbsPven+iHdgIamRwuwiSIsjYuArptr14fyDqNq3KyufD4xsjCHiH7EYkalC6u+MmZKh lNoQEcwY1uPDdAf5ZtSAfTJqoLjRrY5xEigIFODmsAB4SJ80WX2F+SY59t6RkT7LR09t D3kAgaDrK1lR5/WxvzN/hQMxW/9Y//5FUhAb5idSsaZFNOw20DPBRtQQpLmLGEeryOLj AxG1K65pVPSC4xO7KRAqtjb+4BqYSl5sohlV6zuiCHJul97YArWYRUyLlticQKxJyW0K 2ceQ== 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=WV8vWGKFQ2SpsYCXDRkcEes8uHuerA+1iOZq5yPEi9w=; b=vye++XJPbZC4SaVmie2Bs/ytapWbnVzioXgXF5bhbJkABWQlRhbOgEhlMqmpDerfkj aw2KM6YHk5+JCV4FsOqDngk8CQgl6IZzyRGfdLObZE1o5CW1u2SsjUZ2s+7+KIlP+QMB cYwwWuLvTxQ1VSdeZLyUk74oE0Yxpe6J/Tdj9AVLlrsR3dEs/TBn3bhh65+dxYhI9dcH bxr/5+vEM1Od6KYNJiTaAKuChHrsXZUVpw+KPkN7pox8Awo36oPLu8uUMNehOjfuW+5V s5Lqotp3yWM80I45wIi/8n//d1DflwdArKzyOchYdrhQNdK4S4IWklptEeLHc9M1Lo2F HxxQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=B2wbSRQU; 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 rs1-20020a170907036100b0093bab66424esi1701302ejb.773.2023.03.22.10.19.04; Wed, 22 Mar 2023 10:19:27 -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=B2wbSRQU; 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 S231272AbjCVRA0 (ORCPT + 99 others); Wed, 22 Mar 2023 13:00:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231267AbjCVRAC (ORCPT ); Wed, 22 Mar 2023 13:00:02 -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 7639C2823A; Wed, 22 Mar 2023 09:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oY2WDcniWteT4RngVY7hMP6WbEIaFQPuRsjU8Pc+FuOjNMy0hkSNQwFkXwHp9H53INUjP6qUd9y83l0H8kx75PYH3VR4Xik6hDiTh7qzAOrpE1/JSqrw0fxySohv3lKSEqxFssz6W3sjhIawUTpHGab0oKofZQtKV/Ol/+hD3RG07k1+5niny1wrWzUfpbV8FCjRf/fAoRZZkCQqKZe10b/jt+VbTOlNHYOi5tM3nqjNdfBeLK2roTkwQwoQ6NBPZjFIq39lfvGHvDv5gOKkWZw10Phmxa9+uwdAVOYm1J8DobhtbOCZbT+xy7s+uGeK+e1snlNh/YUCv++Zu8QJQw== 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=WV8vWGKFQ2SpsYCXDRkcEes8uHuerA+1iOZq5yPEi9w=; b=FkFJY8I51zoEq6SjBpeKNuDTjGoAR7a3prfvx2AyM1hBzhJ2EDsv49KmdSrKfYomvymPH8uW3SuVDR3k2EiTqPBBoUh+L3Snt1hoCwoROlsTZKkgeuBdN55Aqu2bR9nqKC67APpoxu9g3bz6AIeCOkwuN8+0i0cYLfJsVfgOKLRBNk1kFoh3uJC2Y3Ad5Ys+NWK51aL+4HfBgKMrfsw9h5Lcj7nH3eYWF1/KxQzoBE1DG2imm9k1sdr/oFwccFnl5GukEpehUaa9v57HVlgP0mWi007SlCU28Ry1zBicqSkQYUgykDnk7uI1xstNDNyrWGe7Fm492gq2bLudd4++Xg== 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=WV8vWGKFQ2SpsYCXDRkcEes8uHuerA+1iOZq5yPEi9w=; b=B2wbSRQU3Lh1dcYFSAkPoT8TPBEA6fOM725RJaouswD/vXW0i/jJRGQ8KwyWrcj2bLEwBZTYN65UF7K63y9LfimbFNGbGQbA9xX16TqpFTFOHdKIeoZfb4Au5MMgd8DDx628l/xfrUNDA06byuU6Ve0Am4jSlSXHElYCUr1VB9P/HQZc4Z4gS4AlJrFFTJ5q66RQQHX3U4hZaT53qzstJMClbNyJm0fHIaidVaKxWnBXuGS4HI0gjkng6QsJaL65lcvbvdgUXN64BmUqp+D8ZZ9uKiQ12AkBM/6BXqqsKAZFWHbFU+p/EggXcnPkk0pK8UPtF3mkFHnC5+aYK4b6JA== 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 16:59:53 +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:53 +0000 From: Yangtao Li To: "Darrick J. Wong" Cc: Yangtao Li , Greg Kroah-Hartman , "Rafael J. Wysocki" , Damien Le Moal , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 07/10] xfs: convert to kobject_del_and_put() Date: Thu, 23 Mar 2023 00:59:02 +0800 Message-Id: <20230322165905.55389-6-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: 6e199792-08c1-4890-65c8-08db2af6db02 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P9UQmxOb85J1qfXFMo3kHjkDDWlmoJqGNmA6Zf2mN8Lz9eAz1SZX6BSil0qy87Ddq4SokHR59iRtal1vuHNVeqScNwEO6frwj6SdmaBRvP0tkMwMc3iotvYELgT+nX6vsUSYqD/1S+ijxXzPKAp8IDo5ZfCQIP26sCqVSSiqh5Tagtn9DV13/3cxjPQvu4a/WnDx9q/XiQDSJ3EMY/ZOyUsvnU21IK7Smwz9an0ZijWHgeccV+l08C8fefKf5jPyICsPgV3kV1Vke60WLff+CVhgCAVehOMY3GclFR3AL+jSAWX0MF16Gj2O7poVM8iKxam4bNY6mtmiwckCiImxhwFfcMl2s+xpvMJ4rvQak8AKGx1PAgR9xvn4moOW4e9F7KNtG4tE8af2avjdqPtf2pi7CMZtIy/joKVCORMXzFE61xnnZ7kCp/5PpLwliQHSV56+1c8nOeP9Z7xbICcgepLIrVApzVRP/kIm0C3Bf8vEtxAokpv7tjHqOZQPwsE+3Cn0bPSS+vT4VuZVH6n/q1NJIROO9cIJv6VaovLwp+3l4U65vAX3XkPBHCj601LtI+9XRi40bxW7k/No91aYQSJ/6flA8c5V/P1s2yh6xFG9haePOgHQ9W8TxtH8XWIl9NCDqALgKzw4wF552A6fxlBg9kP3CsZwHnWc9h/UwqU6izJN1WJl5mQ5smU/IU4O5oUV3h1fnsnlHtFYvILrpQ== 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)(6666004)(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: u4ZSM5A8Tyt9IzAtaQpqu0z6C13X4yTMYnkVSpJMA4HdtdrKlnXYbT+mYgJfHxLVTR0yOwQK27S/IyUoYIzzepu5dT1PY+ratLW7wSZdCe+pKSOi/U4/ABZ1RDS0VHrn3zMPDz5QPfEXbm5hOxFr8guhmkaOmFub71k0MxIeLhUq0DL8p3jyWiRGB/w4FMN/b8a4EqxrnjIaKQON9oo7vRlAhW/RuILz1b3QQoqJqn8FAk9lsXoEhM5Arn9lRUs7CJfhvvX4FsdiL5j2D28akLOcveYT0inEtS3xRNawdAlnFepUsGUpum6n9eVPe+x9VoS6kP6gX3TtcTMuA6DFBn3MggcO4oipHNPWFd+sHzk4bHjz3pEhW5iRI3p+1/AOU5jZ8xTvh8uiAESvuD8ArydK7/FbMcxBHzhP8B9EYd9yFR5Z33VVdmWH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/iRzyt5vNjooW8RqiDT780gS4yvTQMoILD9+B79MTbVjYBVUYpfcBeccophZSCijken9loYzxGDOvzWUFkWLqoE2bf X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e199792-08c1-4890-65c8-08db2af6db02 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:53.0557 (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: 0woDf1NxD3GNWu84fo0lVD1uGFExiZTkyUkPO7w1i/u4tuLvYHkf7oq9qRqE69sPlBMJvtegUZGDSlbLXT/Tyw== 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?1761089229884942523?= X-GMAIL-MSGID: =?utf-8?q?1761089229884942523?= 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 Acked-by: Darrick J. Wong Reviewed-by: Damien Le Moal --- 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); }