diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2014-03-07 18:43:24 +0800 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2015-05-02 14:36:28 +0200 |
commit | f0651525ea0b29ce2f9ee8fcd8b090fd25c82e25 (patch) | |
tree | fd3c1e1ad88b60e72e25abae159172208f5337a0 /fs | |
parent | d1f1d65663480bf57d2ee7389ecf5877eea17060 (diff) | |
download | kernel_samsung_tuna-f0651525ea0b29ce2f9ee8fcd8b090fd25c82e25.zip kernel_samsung_tuna-f0651525ea0b29ce2f9ee8fcd8b090fd25c82e25.tar.gz kernel_samsung_tuna-f0651525ea0b29ce2f9ee8fcd8b090fd25c82e25.tar.bz2 |
f2fs: update start nid only once each circle
Integrated a couple of minor changes for better readability suggested by
Chao Yu.
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/node.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1fab621..7d86663 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1873,11 +1873,9 @@ void destroy_node_manager(struct f2fs_sb_info *sbi) while ((found = __gang_lookup_nat_cache(nm_i, nid, NATVEC_SIZE, natvec))) { unsigned idx; - for (idx = 0; idx < found; idx++) { - struct nat_entry *e = natvec[idx]; - nid = nat_get_nid(e) + 1; - __del_from_nat_cache(nm_i, e); - } + nid = nat_get_nid(natvec[found - 1]) + 1; + for (idx = 0; idx < found; idx++) + __del_from_nat_cache(nm_i, natvec[idx]); } f2fs_bug_on(nm_i->nat_cnt); write_unlock(&nm_i->nat_tree_lock); |