ocfs2-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH v2, RESEND 08/10] ocfs2: convert to kobject_del_and_put()
       [not found] <20230319092641.41917-1-frank.li@vivo.com>
@ 2023-03-19  9:26 ` Yangtao Li via Ocfs2-devel
  2023-03-20  3:35   ` Joseph Qi via Ocfs2-devel
  0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li via Ocfs2-devel @ 2023-03-19  9:26 UTC (permalink / raw)
  To: Mark Fasheh, Joel Becker, Joseph Qi
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, linux-kernel, ocfs2-devel,
	Yangtao Li

Use kobject_del_and_put() to simplify code.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/ocfs2/filecheck.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
index 1ad7106741f8..fb9cf601245b 100644
--- a/fs/ocfs2/filecheck.c
+++ b/fs/ocfs2/filecheck.c
@@ -198,8 +198,7 @@ void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb)
 	if (!osb->osb_fc_ent.fs_fcheck)
 		return;
 
-	kobject_del(&osb->osb_fc_ent.fs_kobj);
-	kobject_put(&osb->osb_fc_ent.fs_kobj);
+	kobject_del_and_put(&osb->osb_fc_ent.fs_kobj);
 	wait_for_completion(&osb->osb_fc_ent.fs_kobj_unregister);
 	ocfs2_filecheck_sysfs_free(&osb->osb_fc_ent);
 }
-- 
2.35.1


_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Ocfs2-devel] [PATCH v2, RESEND 08/10] ocfs2: convert to kobject_del_and_put()
  2023-03-19  9:26 ` [Ocfs2-devel] [PATCH v2, RESEND 08/10] ocfs2: convert to kobject_del_and_put() Yangtao Li via Ocfs2-devel
@ 2023-03-20  3:35   ` Joseph Qi via Ocfs2-devel
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi via Ocfs2-devel @ 2023-03-20  3:35 UTC (permalink / raw)
  To: Yangtao Li, Mark Fasheh, Joel Becker
  Cc: Greg Kroah-Hartman, linux-kernel, ocfs2-devel, Rafael J. Wysocki



On 3/19/23 5:26 PM, Yangtao Li wrote:
> Use kobject_del_and_put() to simplify code.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  fs/ocfs2/filecheck.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
> index 1ad7106741f8..fb9cf601245b 100644
> --- a/fs/ocfs2/filecheck.c
> +++ b/fs/ocfs2/filecheck.c
> @@ -198,8 +198,7 @@ void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb)
>  	if (!osb->osb_fc_ent.fs_fcheck)
>  		return;
>  
> -	kobject_del(&osb->osb_fc_ent.fs_kobj);
> -	kobject_put(&osb->osb_fc_ent.fs_kobj);
> +	kobject_del_and_put(&osb->osb_fc_ent.fs_kobj);
>  	wait_for_completion(&osb->osb_fc_ent.fs_kobj_unregister);
>  	ocfs2_filecheck_sysfs_free(&osb->osb_fc_ent);
>  }

Can't find any implementation of kobject_del_and_put() in mainline.
So I guess you've introduced it at the beginning of this series? Since I
can only see this one:(
So it depends on kobject lib. If kobject lib accepts this helper, it's
fine to me.

Thanks,
Joseph

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-22 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230319092641.41917-1-frank.li@vivo.com>
2023-03-19  9:26 ` [Ocfs2-devel] [PATCH v2, RESEND 08/10] ocfs2: convert to kobject_del_and_put() Yangtao Li via Ocfs2-devel
2023-03-20  3:35   ` Joseph Qi via Ocfs2-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).