Re: [f2fs-dev] [PATCH v3 01/10] kobject: introduce kobject_del_and_put()

2023-04-04 Thread Yangtao Li via Linux-f2fs-devel
> kobject_put() actually covers kobject removal automatically, which is > single stage removal. So if you see the two called together, it is > safe to kill kobject_del() directly. If the reference count is not abnormal, kobject_put() does contain what kobject_del() does. Thx, Yangtao

Re: [f2fs-dev] [PATCH v3 01/10] kobject: introduce kobject_del_and_put()

2023-03-23 Thread Greg KH
On Thu, Mar 23, 2023 at 12:58:30AM +0800, Yangtao Li wrote: > There are plenty of using kobject_del() and kobject_put() together > in the kernel tree. This patch wraps these two calls in a single helper. > > Signed-off-by: Yangtao Li > --- > v3: > -convert to inline helper > v2: > -add

Re: [f2fs-dev] [PATCH v3 01/10] kobject: introduce kobject_del_and_put()

2023-03-22 Thread Ming Lei
On Thu, Mar 23, 2023 at 12:58:30AM +0800, Yangtao Li wrote: > There are plenty of using kobject_del() and kobject_put() together > in the kernel tree. This patch wraps these two calls in a single helper. > > Signed-off-by: Yangtao Li > --- > v3: > -convert to inline helper > v2: > -add

Re: [f2fs-dev] [PATCH v3 01/10] kobject: introduce kobject_del_and_put()

2023-03-22 Thread Damien Le Moal via Linux-f2fs-devel
On 3/23/23 01:58, Yangtao Li wrote: > There are plenty of using kobject_del() and kobject_put() together > in the kernel tree. This patch wraps these two calls in a single helper. > > Signed-off-by: Yangtao Li > --- > v3: > -convert to inline helper > v2: > -add kobject_del_and_put() users >

[f2fs-dev] [PATCH v3 01/10] kobject: introduce kobject_del_and_put()

2023-03-22 Thread Yangtao Li via Linux-f2fs-devel
There are plenty of using kobject_del() and kobject_put() together in the kernel tree. This patch wraps these two calls in a single helper. Signed-off-by: Yangtao Li --- v3: -convert to inline helper v2: -add kobject_del_and_put() users include/linux/kobject.h | 13 + lib/kobject.c