aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index a0aa0446a237..c8f48d436487 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1245,6 +1245,10 @@ static int add_free_nid(struct f2fs_nm_info *nm_i, nid_t nid)
1245 1245
1246 if (nm_i->fcnt > 2 * MAX_FREE_NIDS) 1246 if (nm_i->fcnt > 2 * MAX_FREE_NIDS)
1247 return 0; 1247 return 0;
1248
1249 /* 0 nid should not be used */
1250 if (nid == 0)
1251 return 0;
1248retry: 1252retry:
1249 i = kmem_cache_alloc(free_nid_slab, GFP_NOFS); 1253 i = kmem_cache_alloc(free_nid_slab, GFP_NOFS);
1250 if (!i) { 1254 if (!i) {
@@ -1286,10 +1290,6 @@ static int scan_nat_page(struct f2fs_nm_info *nm_i,
1286 int fcnt = 0; 1290 int fcnt = 0;
1287 int i; 1291 int i;
1288 1292
1289 /* 0 nid should not be used */
1290 if (start_nid == 0)
1291 ++start_nid;
1292
1293 i = start_nid % NAT_ENTRY_PER_BLOCK; 1293 i = start_nid % NAT_ENTRY_PER_BLOCK;
1294 1294
1295 for (; i < NAT_ENTRY_PER_BLOCK; i++, start_nid++) { 1295 for (; i < NAT_ENTRY_PER_BLOCK; i++, start_nid++) {