Blame SOURCES/0061-exfat-remove-useless-check-in-exfat_move_file.patch

Kmods SIG 9e3ffb
From eae503f7eb0509594076a951e422e29082385c96 Mon Sep 17 00:00:00 2001
Kmods SIG 9e3ffb
From: Tetsuhiro Kohada <kohada.t2@gmail.com>
Kmods SIG 9e3ffb
Date: Fri, 11 Sep 2020 13:45:06 +0900
Kmods SIG 9e3ffb
Subject: [Backport eae503f7eb05] exfat: remove useless check in
Kmods SIG 9e3ffb
 exfat_move_file()
Kmods SIG 9e3ffb
Kmods SIG 9e3ffb
In exfat_move_file(), the identity of source and target directory has been
Kmods SIG 9e3ffb
checked by the caller.
Kmods SIG 9e3ffb
Also, it gets stream.start_clu from file dir-entry, which is an invalid
Kmods SIG 9e3ffb
determination.
Kmods SIG 9e3ffb
Kmods SIG 9e3ffb
Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Kmods SIG 9e3ffb
Acked-by: Sungjong Seo <sj1557.seo@samsung.com>
Kmods SIG 9e3ffb
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Kmods SIG 9e3ffb
---
Kmods SIG 9e3ffb
 src/namei.c | 5 -----
Kmods SIG 9e3ffb
 1 file changed, 5 deletions(-)
Kmods SIG 9e3ffb
Kmods SIG 9e3ffb
diff --git a/src/namei.c b/src/namei.c
Kmods SIG 9e3ffb
index 676094f2abe2d13573c7e970cbf595586f46a059..2932b23a3b6c36ebfb82e5a5e7621c07fbb2822d 100644
Kmods SIG 9e3ffb
--- a/src/namei.c
Kmods SIG 9e3ffb
+++ b/src/namei.c
Kmods SIG 9e3ffb
@@ -1094,11 +1094,6 @@ static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir,
Kmods SIG 9e3ffb
 	if (!epmov)
Kmods SIG 9e3ffb
 		return -EIO;
Kmods SIG 9e3ffb
 
Kmods SIG 9e3ffb
-	/* check if the source and target directory is the same */
Kmods SIG 9e3ffb
-	if (exfat_get_entry_type(epmov) == TYPE_DIR &&
Kmods SIG 9e3ffb
-	    le32_to_cpu(epmov->dentry.stream.start_clu) == p_newdir->dir)
Kmods SIG 9e3ffb
-		return -EINVAL;
Kmods SIG 9e3ffb
-
Kmods SIG 9e3ffb
 	num_old_entries = exfat_count_ext_entries(sb, p_olddir, oldentry,
Kmods SIG 9e3ffb
 		epmov);
Kmods SIG 9e3ffb
 	if (num_old_entries < 0)
Kmods SIG 9e3ffb
-- 
Kmods SIG 9e3ffb
2.31.1
Kmods SIG 9e3ffb