Patchwork [2/7] libext2fs: create a new dir with inline data while ino is greater than or equal to the first ino

login
register
mail settings
Submitter Zheng Liu
Date Nov. 15, 2012, 8:13 a.m.
Message ID <1352967209-29616-3-git-send-email-wenqing.lz@taobao.com>
Download mbox | patch
Permalink /patch/199207/
State New
Headers show

Comments

Zheng Liu - Nov. 15, 2012, 8:13 a.m.
From: Zheng Liu <wenqing.lz@taobao.com>

Now when the inode number is greater than or equal to the first inode number, we
will create a new dir with inline data if inline_data feature is enabled and dir
name is not lost+found.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 lib/ext2fs/mkdir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/lib/ext2fs/mkdir.c b/lib/ext2fs/mkdir.c
index 3bbe808..d48a075 100644
--- a/lib/ext2fs/mkdir.c
+++ b/lib/ext2fs/mkdir.c
@@ -56,7 +56,8 @@  errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum,
 	}
 
 	if (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_INLINE_DATA &&
-	    ino > EXT2_FIRST_INO(fs->super) && strcmp("lost+found", name) != 0) {
+	    ino >= EXT2_FIRST_INO(fs->super) &&
+	    strcmp("lost+found", name) != 0) {
 		retval = ext2fs_inline_data_mkdir(fs, parent, ino, name);
 		if (retval)
 			goto cleanup;