lkml.org 
[lkml]   [2015]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] f2fs: guarantee node/meta inode number won't be reused
Date
Node/Meta inode numbers are also should not be reused, this patch
guarantee it.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
fs/f2fs/node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 4687eae..1a7e925 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1421,7 +1421,7 @@ static int add_free_nid(struct f2fs_sb_info *sbi, nid_t nid, bool build)
return -1;

/* 0 nid should not be used */
- if (unlikely(nid == 0))
+ if (unlikely(nid == 0 || nid == 1 || nid == 2))
return 0;

if (build) {
--
1.9.1


\
 
 \ /
  Last update: 2015-03-09 04:41    [W:0.088 / U:26.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site