lkml.org 
[lkml]   [2023]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 10/10] nilfs2: convert to kobject_del_and_put()
    Date
    Use kobject_del_and_put() to simplify code.

    Signed-off-by: Yangtao Li <frank.li@vivo.com>
    ---
    fs/nilfs2/sysfs.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c
    index 379d22e28ed6..150965d58ca5 100644
    --- a/fs/nilfs2/sysfs.c
    +++ b/fs/nilfs2/sysfs.c
    @@ -1042,8 +1042,7 @@ void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs)
    nilfs_sysfs_delete_segments_group(nilfs);
    nilfs_sysfs_delete_superblock_group(nilfs);
    nilfs_sysfs_delete_segctor_group(nilfs);
    - kobject_del(&nilfs->ns_dev_kobj);
    - kobject_put(&nilfs->ns_dev_kobj);
    + kobject_del_and_put(&nilfs->ns_dev_kobj);
    kfree(nilfs->ns_dev_subgroups);
    }

    --
    2.35.1
    \
     
     \ /
      Last update: 2023-03-27 01:06    [W:2.422 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site