fsck.f2fs: fix wrong i_name check for directory

We should not check the consistency between i_name and its dentry for directory.
The i_name is used only for normal file recovery when conducting roll-forward
recovery.

Moreover, this condition was totally missing encryption case which is breaking by

1. encrypt ./test
2. mkdir ./test/a
3. mkdir ./test/b
4. rename ./test/a ./test/b

-> fsck.f2fs reports wrong inconsistency in terms of i_name.

Reported-by: liushuoran <liushuoran@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 894dd9b..0e5aa7c 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -423,26 +423,6 @@
 		}
 	}
 
-	if (ntype == TYPE_INODE && ftype == F2FS_FT_DIR) {
-		u32 len = le32_to_cpu(node_blk->i.i_namelen);
-		if (name && memcmp(name, node_blk->i.i_name, len)) {
-			int is_encrypt = file_is_encrypt(&node_blk->i);
-			unsigned char en1[F2FS_NAME_LEN + 1];
-			unsigned char en2[F2FS_NAME_LEN + 1];
-			/* if file is encrypted, its parent must be encrypted */
-			int len1 = convert_encrypted_name(name, len, en1,
-							is_encrypt);
-			int len2 = convert_encrypted_name(node_blk->i.i_name,
-							len, en2, is_encrypt);
-			en1[len1] = '\0';
-			en2[len2] = '\0';
-			ASSERT_MSG("mismatch name [0x%x] [%s vs. %s]%s",
-					nid, en1, en2,
-					is_encrypt ? " <encrypted>" : "");
-			return -EINVAL;
-		}
-	}
-
 	/* this if only from fix_hard_links */
 	if (ftype == F2FS_FT_MAX)
 		return 0;