From patchwork Wed Mar 22 16:59:00 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: 73550 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2461214wrt; Wed, 22 Mar 2023 10:17:15 -0700 (PDT) X-Google-Smtp-Source: AK7set+1PFRn643N5F197QPP0X7EBa2lMZBnTcPXw4eAhOGuKcNlqrMnSBWaxEAxFGIeMqe7k3kl X-Received: by 2002:a17:907:c306:b0:920:7a99:dcd4 with SMTP id tl6-20020a170907c30600b009207a99dcd4mr8439968ejc.62.1679505434926; Wed, 22 Mar 2023 10:17:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679505434; cv=pass; d=google.com; s=arc-20160816; b=BBCLQd9OffowV0xCFHjPwnrtWnZRPo9/160Gf0wSlYs6MWwnzNgs+D9sGJCHQfTqXS CBA/zCnR5a7wDu/2ovdS6/LDf8gQ9yVkHUhw2Mxlzr4y+OjaAGAxmvx/ejpXd69jGx8l dgi/ie1C0KzkACYVwJCMyvcp6KQQKuakdw72If4ahud0y4ONEElH/tSEETrQG4Uymwck 8fW6bzBFGuPVfnqrlYB/pgEbwc3/efbFiHE8miH5h7/RLT8MNuatWXNWcdI94dSubiJc 7QPik+1jXKxyU48vci59HGljA47fvSO2LzZH3owlItD4QDhLLQYosDW49bGYKZ6iKUvh L8Qg== 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=zeQHK9btMEEetoQ258/+zZi9o7P0QMgrRsf6CanIx3o=; b=r5PfRYu4RHg1ULgm18t4wUQrkI+abVp3DpKVo5eCeFNSAmXYtpaTquVPEKMS12bEOC GEOBL934AGd3aqrQR7yJfVhTopWdF+9cF3NUqyl3DfcMuXqNcBPge1QlxMBGJYI6t+nx avjUxLfyv+bZ49bCxCvFw5QJXoJCqMoHnC9ozsDxCXnmNj9IAu2RYz2FyKKmixFbUcAT WG/Zro+XOVad5yqEWFFGZTMaLkUKJN0o8RvkV6Noo8HVtE2bem0UHNeJ0hE9UJwh9vzZ uEQe/NNQdU3lvXm8T55HhIX2UAuvQiPm6S5ZR+ppHALDITsTqcFfHsTXXRTAyopIDFzc sqYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="Fr4B6MV/"; 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 nd12-20020a170907628c00b00933d7a0e4e7si12211662ejc.441.2023.03.22.10.16.51; Wed, 22 Mar 2023 10:17:14 -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="Fr4B6MV/"; 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 S231357AbjCVRAS (ORCPT + 99 others); Wed, 22 Mar 2023 13:00:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229864AbjCVQ7x (ORCPT ); Wed, 22 Mar 2023 12:59:53 -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 83DE228E8B for ; Wed, 22 Mar 2023 09:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dhNF/RzQNc+fpWIx0DdgQ85QQfrDFa1ybi1J6TBGzwALqsF0bWBmSaQAhngW1e6jFgyeCH7k/oJalLW5zi43w7S1iJjBhxmTPT/w4X7zoDT9mRdtI/DZ7URZQyRP+MDrGyIH50ia4mXIdwl+OzefSaHnre6aoCtTQkqXi78o3Z8f9YBNuIgFOonxyzAnCByrkpNBGR2hzGG5lMnm8uGakFyBg739y38suABtr0VuG7ypWlJ+DlHASNNCZtvFXQhOG7MUW2qna5pnqqC+FCBdUjY90dmlnIoHfnd+ROXPHt+wvPw9d8+nVltYA/Ggdudu8PCnXWQOsdvgI2cxLNipmA== 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=zeQHK9btMEEetoQ258/+zZi9o7P0QMgrRsf6CanIx3o=; b=TbIGKdmQsgLEKq8224wvjugRLBJJMb4iAZFgvMw4dn9qBnXbV9OEWIIIvzu4vqdmz8TfuhbI/wTknDDVzWb7cXsyRynR1PwraDq/CPWMTeMjbw/JW1aZjh2h5ztKF2rYohA1Y42fSIQycOUqWXR5Ey0uha/JLgRJka2tRHd3ufqqa8Ii4cdQ1xULtF2LYN1nfi0TrKbRMac3M1F1Wo5IgPDlTr4m0XOFw99E/kwTohCuJY46H/4wPNw7akBk+L/5RwwixkqZ55/V9h4YMhquZds8LzgT2BoG9Kh1wAI7brjUxeYmL+J4ezq+10qWzKZKeCTOq3Bg0ObFd6XObAxjkw== 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=zeQHK9btMEEetoQ258/+zZi9o7P0QMgrRsf6CanIx3o=; b=Fr4B6MV/U4v5MDOmSdjE7cXXP3ITeZ9epkKH0V/xXFtNWv0XNIv61o29kazUn5QmpOWbs7MrOVckvjQ60gblpciXElSk1tsmUQslDVeQ3SZr1laP4aFwV+6gLNmMGHCzPEU4O52H2pvIwtexG7fjPcZ5GEFMHtwzfNViuyBvMAanhNbrr0QfBkq05cYkOSyAMGFAtg4uy82YxUdVORZimqxptYyAgnbiDJVib4YrRuwC8k54yjKcRF8Kj82+QeRKlbMC4s+ubdGipSB/6xlGStuGQhZGZXjDHiM3kiAaBNdTBCrwRQcAr6qyPVVc9QAv/tSLY3p49MT7DVTmaLBfeQ== 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:43 +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:43 +0000 From: Yangtao Li To: Richard Weinberger Cc: Yangtao Li , Greg Kroah-Hartman , "Rafael J. Wysocki" , Damien Le Moal , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 05/10] ubifs: convert to kobject_del_and_put() Date: Thu, 23 Mar 2023 00:59:00 +0800 Message-Id: <20230322165905.55389-4-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_|SG2PR06MB5238:EE_ X-MS-Office365-Filtering-Correlation-Id: 574b2aea-b45a-4289-6fa4-08db2af6d564 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JPCM7jg44gW4dKN4xtdG7iHtiE4N2NsGi1Ohdc4O46oTAJlgSxrEqVVUzUkyKpTkxVbi2Z17ei7wcpFWGvoU95A74HEtuTcmv0IzVJb9/dMUTvQaTItMGDQarSVeQpUwat5YGYgZ32J6cfM5h8F48r4Zu7F3LnQNWYj7AEA4A4M8NZMY1h+Zf1NGXdnJ8gL44Pa2ZqUSuMj+u9zufRJedG1h1OB8gVpc8MvmWph7l4VaQT/0zOrxOWrGVyivfzCAu2NQ/BBOToj96Kd8r9acl8VmpmtTqnuGkXjta5xDijsbqJSK886MXLnfg0wQ7JissyiWC8suQrgCRUqAPHUEo/mlCVVaobPyCY+G8OcggxcgHpvsdoX8NQiDv9tpLW568zeWRorFGyyrT5OqFEp+0xy06Lnejtl+3mq4hJ1dCuVSVrwgHSKehZLs08T3EzCX3LZkEP9IbT/UBOL1qMkoRM+7990+u6rkZdubSY3bewbxLEQI4j34PEOV2DSxEWF9fH1blvQoGGY5TrHOaTgDlSV7N0fdjSZjslsy/WhMfAHzuqOPvqVUXBU56fSumI04uQ/r3YnrEfaSXMTcP8uVqq+oxzu2WXcIVIDjxrfEshsyM+yGUaYSTF/ksd5uZnyptTsF4GrKZU87lzs2H7e2ET2IY2hhxW2hIMtcq5GfbLsPiZ4AmzQaBwFSsywc/DfBEOPYpFSLeMlUFJ00LD7oZQ== 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)(316002)(66476007)(66946007)(66556008)(6512007)(6916009)(26005)(186003)(8676002)(54906003)(4326008)(1076003)(8936002)(4744005)(41300700001)(5660300002)(2906002)(38100700002)(38350700002)(36756003)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E5utXRMp2izd11Qlu2O9ryZY+NvvFBdzrCZOElIip+WOWrheOlwta9vzgFueT+XFvT3Eeyob3lePU2jnoF/wrceQ7pvB9xYaVhlkvEs9KRJx/U1V2y/nAzCDqOQfRYn0pQA63ZYQBukGwDtkXjFRjbW4iNC9fZGsMzqdmidBHNzKJ2JUDm5tpmvunU8RA/7glDQOhjqvcRqsMf02iIUifx7TtolOjM6sx8wQZuvpavJpRcrk4ho9HLwdSDXpB3xRFrgX+PPGxbt58FjMBszXTIcfWAnyN6s5EC09JFgoSyKoeBX4tHKaGFKy41o72fVjiZTG5fA2dicki4+wpMILdvUlfpsKjdnuER7Esdii90Fc+id3n5g9Kc0ZUo7lUTkIrHJIy4yKhg0uWss5bGP7gLICN600CBZUw8oS6LRuId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I7eUrJJ+mCPGoN+o85pMIJMYNvSbrq8x2P5iVv/M3u6M0vEP/jtsmZZqA+UQ2tWJFnH2sNbT4CTTY0iSguXKwWb X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 574b2aea-b45a-4289-6fa4-08db2af6d564 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:43.6788 (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: /zjgb+F1bBo8UWrfX7aNQlrnq+N+zKL8z7UO27F/t7N9DX/0WxT4FfBZrawbNUueRSShVvsh92TONJYO4pIaSg== 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?1761088988782036192?= X-GMAIL-MSGID: =?utf-8?q?1761089091086467806?= 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 Reviewed-by: Zhihao Cheng --- fs/ubifs/sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c index 1c958148bb87..9571718e61a9 100644 --- a/fs/ubifs/sysfs.c +++ b/fs/ubifs/sysfs.c @@ -130,8 +130,7 @@ int ubifs_sysfs_register(struct ubifs_info *c) void ubifs_sysfs_unregister(struct ubifs_info *c) { - kobject_del(&c->kobj); - kobject_put(&c->kobj); + kobject_del_and_put(&c->kobj); wait_for_completion(&c->kobj_unregister); kfree(c->stats);