From patchwork Wed Mar 22 16:58:57 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: 73556 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2461749wrt; Wed, 22 Mar 2023 10:18:19 -0700 (PDT) X-Google-Smtp-Source: AK7set8SEtNKqUhM3r5rhqvExg5DhQTBkJglKR45TXdZG1mp07fUUT9Ww0OH/7xm2dCXNvDJe598 X-Received: by 2002:a17:907:969e:b0:8b1:3a23:8ec7 with SMTP id hd30-20020a170907969e00b008b13a238ec7mr8606810ejc.43.1679505498944; Wed, 22 Mar 2023 10:18:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679505498; cv=pass; d=google.com; s=arc-20160816; b=0a0uUfOK9ThBcocdUve7HH5gaVd3KuX41z1M4Q32CW/ekvayqaj1SaWnWYsjkZbt// nY8ckKCzkhGUgbZ0GElSZw0ngAiZvTIpoGzfJvedq+NyW3LMqZRLx/mXFmzhWMlPBS+L 2aJxepdNevZMgwn0ZkII2EDdznfOzqEBttLmLfPvhCA+d6kwGfKfLJkCr2i1QvHzBLVA 0AupjrG7I18FNvMS18Q+53LElyzpQ1Zm/09MyTyIjaip3dtI2jQSPLFiIjgv0juy/HXw xImcHhkHeJCBts7ljd96F/LBQkaSbtKz4C+TZJAoI49DgIMe5Bed9q2RQuDx5P06hqyL 63qw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=sX4N8DgWgxcksV62oYRh79eSYh7nL6ePu6WISP6rzL0=; b=A7A44XJXEWsAkoEJzkcWSBKFZ6IK0i2com6GxF/jVn1WNEucpJs4MVubPRZQ/TSlOb YVm+O6GqaONkYvwzlkkcv9bR691QD+zfZFf0rrzoEl98vecFww/KntdOG+GhpMnxRp/b a/35JC6QKFeCDAqUvUEft+ikhlUbgSgHry2qAVHn2eHwS+rEodJfCI+OtcwEhVawyPp3 ztLNz8rzt/Ho6ytmuCm0BxL6lzUCpEKSy2G8KyY8EKSS38rSFIjkKSmeT+Bh0G4Xh/Fx ZNwT8Sqslfcn6preMCc/3UmAi5l3Ta/vynT09Y0c0ohuh6sy/aKNnmTB0G73zK1QIlWh dz+A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=cOQn9vgN; 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 d15-20020a056402516f00b004fb438282dfsi15849918ede.526.2023.03.22.10.17.55; Wed, 22 Mar 2023 10:18:18 -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=cOQn9vgN; 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 S231264AbjCVQ7j (ORCPT + 99 others); Wed, 22 Mar 2023 12:59:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231235AbjCVQ7f (ORCPT ); Wed, 22 Mar 2023 12:59:35 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2138.outbound.protection.outlook.com [40.107.117.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10E7243904 for ; Wed, 22 Mar 2023 09:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iW1gh5Ct73wMkwssD5EM4HM1Py54l/c6vqTYpIuWYyxpf6xLYq5PQw1n/HTDrsKTSqn/71PnWhJH8vqQ7eMxGV/dmFxrdT5DmCrMqCHID0WAsqEUW/jKMlmSqqM8fvxS24E2xuohURTINVHZVKMWSSxt6d4RUXb2VvxYtsipk3gylyIgOoFX7DTtd3yu/OJKPDporsj0Iuy2798f6NqfBvLMlIENHiGkqLXJze1R/6F5il7ddUlSNYtQ+u+Ia0vEptjxRj4TXbYRbCGSf7gk5QgNPCIfZtC7nyV0Gl+eeUVj6S3eeJF4ouE7b00viJgJHCRvyo+RoJNZJRAI1ZYnZQ== 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=sX4N8DgWgxcksV62oYRh79eSYh7nL6ePu6WISP6rzL0=; b=WFRs9USX8l9ErnVThlNjQjj7bLMTiwFqVuLdi/ef6JfDnK1k6/IDIXrg2nwreTL70K/qGFGD3BQUEcS392qKuebVJFPmaQsFkXQKNy3PAGt5/OSc6glXxvschwzvlwwDCeQ/hzcVUxBXxgDszOLEKgZSXyU249sZSadMN963oK0hN+gMteunrB4xNqhrj9+CD2oRWSwVt3TX7fTtQ9cPNgG+vYK2ZOiH+28cgSzo/Us8EGL8HMCWrWWUrPt7hSjO8qZlE/s4zcFB7DJ8quCtKBSK/vqS6i1agU7c6hM/30Yzy8wlthblsW4lwvmOpD7ehWv80/0D2aehc8jOrkM+ow== 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=sX4N8DgWgxcksV62oYRh79eSYh7nL6ePu6WISP6rzL0=; b=cOQn9vgNtjDVo3otiKrVw5NH8ytlY8RJmknoys1OciMIoo0m+m7p9kcVmsFb09Bidmn+2rJ+O3eJUCFiDNsjePTmL0emi843j1RaV/tTh02Wt1tZsH4fXQzlUA1GsWcgGowJiUi7+2suZp6YA8CMFxjvtlhAYaYJL9DF43uBgUGpfwt98VsGDSN1W9EuXeT6U3ms60dioT5vwRr68UaKMpI1WXJASqUFoHVlsXbeHPT79UP/KxXFFLNCwJbI1aH83fRC1e/dmK8N6QEwp8PFn49RizfogMqVwrWvMcmUK8Iz/VVMgLX1AMZiDa1YlkY4B2mJTffSeQjmDKBAyCjiiQ== 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 SG2PR06MB5238.apcprd06.prod.outlook.com (2603:1096:4:1d8::8) 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:19 +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:19 +0000 From: Yangtao Li To: Jaegeuk Kim , Chao Yu Cc: Yangtao Li , Greg Kroah-Hartman , "Rafael J. Wysocki" , Damien Le Moal , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH v3 02/10] f2fs: convert to kobject_del_and_put() Date: Thu, 23 Mar 2023 00:58:57 +0800 Message-Id: <20230322165905.55389-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 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_|SG2PR06MB5238:EE_ X-MS-Office365-Filtering-Correlation-Id: 56b51b13-7de4-4a54-0d8d-08db2af6c6be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8oGgEjtarj9UwgRNDuVW1LH4thdLuu3lsIP4cOxXAzFfXPfLt43NMUm2GObDIvXlgSa9E6OXfQvWxCWEwG4lxcCdW2VSV+qHl0ab+c18LZ39ad2Lms2KV58JWmgmt4Z11VEgHNFSbhifFLc6CRo1OgIRBkx3kA456HhkAM9mKLEA8txunaB19zrK3GzUherZH7y63nOujojfCYiAcNim+q4VqRSHUGxwfI2ryZbMJ9tIy5gaZkczOmCNDxSgJJHerJk9mYXPLZ02JI83hAzcv7ft/U3VwHVB27nVW6r9IcagT8+KQ+jV/S0TsKktgiDxKOUfLe95pv4JTHGV9k780xdDuk1I4jUP05UZzQmUaahMMtTnZ0RA55w9xzLPoiSJVEcRVMzvxqYJOu6hWdAMqzmChS+y+dhpqSwFNcSAQL6X4oTAx+5V24y+FW+v4Kko1HgJodFnsLl3ZoQQIkZyYJKQwKT8bpJZOHAH3FTFcUrS59eTDJqoXx1ryRnjWCWoDLDXD/3Dz58AaDpAcMDDAJ7f34Y+vpLwV7bG88e8JssGUER/CnG2mqGgXP8K1Sv5YWxYWcP9ltOsl+Uka7opbvao5Tbq7A6RKdIze0A5GJmoWggMgj+CowjWwQqrFB3t+IMIFhafmqtekyfor0FwtyzJHd/wrL/Gcp+fn9uwLVf6u3scUcSrEkMozt+wZwiwEKsFUNRFkquB/3OnkbDEcw== 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)(136003)(346002)(396003)(366004)(376002)(451199018)(2616005)(6506007)(52116002)(478600001)(6486002)(6666004)(83380400001)(110136005)(316002)(66476007)(66946007)(66556008)(6512007)(26005)(186003)(8676002)(54906003)(4326008)(1076003)(8936002)(41300700001)(5660300002)(2906002)(38100700002)(38350700002)(36756003)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2SuS710xo5cwPNs+eMsmsHQm1GFgGOwn0yovemWsrqKWiPlklfggxy1TrGwCL2MpZsEiHTRobi8/voam5OldcrKZ++HF58BsJAbLWZNxspmQstkzi5DUyA1tBn53nagoxuh16eDcV4yfritF/UeyoX/wq/2Uo7Tz7T8kzsLu06THK65dL/7ONMtmxhUIjMDVXfL/ovTYTY6S3Z6zvXvXvNGxWp2gx5SsgQdUM7V2XRs2L5XeTZd7ImRLgqXVViYHggjGIV0ZRJJBe5+O6RZfQxbkxec82Wb9Di9Dg3YFf+89+oEK4e8+PZDIJzEBXcbGzO6iiAbMvgFivVYwjNT1zdlmlaHvHFFvHt0jSnjp5647W+BjhFnF7CF2jWzLfASnp9Dxnbl3lM7svic8qXbxHCynCUdTMhZ/pMuXqVepImawFepYNQFXpQ1RAgf4v86BrJ5TBCesIjV2AkeOYu5bzMP+nxPqPCuB/eoOHWS1NkF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1qWhbF4bDg7+or3YzBZYgsIfXYMi5xm6cyh X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56b51b13-7de4-4a54-0d8d-08db2af6c6be 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:19.0847 (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: Rf+8mNyL3G7CG5EvG5nyj9kZczFQZ0f4IIAErLolaZ0gVFWLEqP1XnqM6TJoQwoTJ2wleMe5akdK5/dy1iBX6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5238 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?1761089158079863522?= X-GMAIL-MSGID: =?utf-8?q?1761089158079863522?= 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/f2fs/sysfs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 9ddc6ee19433..b455afc12cfc 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -1478,14 +1478,11 @@ void f2fs_unregister_sysfs(struct f2fs_sb_info *sbi) remove_proc_entry(sbi->sb->s_id, f2fs_proc_root); } - kobject_del(&sbi->s_stat_kobj); - kobject_put(&sbi->s_stat_kobj); + kobject_del_and_put(&sbi->s_stat_kobj); wait_for_completion(&sbi->s_stat_kobj_unregister); - kobject_del(&sbi->s_feature_list_kobj); - kobject_put(&sbi->s_feature_list_kobj); + kobject_del_and_put(&sbi->s_feature_list_kobj); wait_for_completion(&sbi->s_feature_list_kobj_unregister); - kobject_del(&sbi->s_kobj); - kobject_put(&sbi->s_kobj); + kobject_del_and_put(&sbi->s_kobj); wait_for_completion(&sbi->s_kobj_unregister); }