• Hou Pengyang's avatar
    f2fs: reconstruct the code to free an extent_node · a03f01f2
    Hou Pengyang authored
    There are three steps to free an extent node:
    1) list_del_init, 2)__detach_extent_node, 3) kmem_cache_free
    
    In path f2fs_destroy_extent_tree, 1->2->3 to free a node,
    But in path f2fs_update_extent_tree_range, it is 2->1->3.
    
    This patch makes all the order to be: 1->2->3
    It makes sense, since in the next patch, we import a victim list in the
    path shrink_extent_tree, we could check if the extent_node is in the victim
    list by checking the list_empty(). So it is necessary to put 1) first.
    Signed-off-by: default avatarHou Pengyang <houpengyang@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    a03f01f2
extent_cache.c 18 KB