> 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
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
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
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
>
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