f2fs: reconstruct the code to free an extent_node
authorHou Pengyang <houpengyang@huawei.com>
Tue, 26 Jan 2016 12:56:25 +0000 (12:56 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 23 Feb 2016 00:07:23 +0000 (16:07 -0800)
commita03f01f26739391e3700991c540f6361457d6e3c
tree7c50f30bcb7e680050b819ccb10820e2c7a3ff29
parent7c506896cf933a07460dd9777ac023382446beac
f2fs: reconstruct the code to free an extent_node

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: Hou Pengyang <houpengyang@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/extent_cache.c
This page took 0.028657 seconds and 5 git commands to generate.