[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c3c19fcb-07b7-415a-95ed-eba31702badf@huawei.com>
Date: Thu, 23 Mar 2023 09:08:44 +0800
From: Zhihao Cheng <chengzhihao1@...wei.com>
To: Yangtao Li <frank.li@...o.com>, Richard Weinberger <richard@....at>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
<linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 05/10] ubifs: convert to kobject_del_and_put()
> Use kobject_del_and_put() to simplify code.
>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> Cc: Damien Le Moal <damien.lemoal@...nsource.wdc.com>
> Signed-off-by: Yangtao Li <frank.li@...o.com>
> ---
> fs/ubifs/sysfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
Reviewed-by: Zhihao Cheng <chengzhihao1@...wei.com>
> 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);
>
Powered by blists - more mailing lists