[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5319A2CC.3090206@cn.fujitsu.com>
Date:	Fri, 07 Mar 2014 18:43:24 +0800
From:	Gu Zheng <guz.fnst@...fujitsu.com>
To:	Kim <jaegeuk.kim@...sung.com>
CC:	f2fs <linux-f2fs-devel@...ts.sourceforge.net>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/5] f2fs: update start nid only once each circle
Signed-off-by: Gu Zheng <guz.fnst@...fujitsu.com>
---
 fs/f2fs/node.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 8c14110..9653096 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1875,11 +1875,15 @@ void destroy_node_manager(struct f2fs_sb_info *sbi)
 	while ((found = __gang_lookup_nat_cache(nm_i,
 					nid, NATVEC_SIZE, natvec))) {
 		unsigned idx;
+
+		nid = nat_get_nid(natvec[found - 1]) + 1;
+
 		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);
 		}
+
 	}
 	f2fs_bug_on(nm_i->nat_cnt);
 	write_unlock(&nm_i->nat_tree_lock);
-- 
1.7.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
