Blame SOURCES/0045-exfat-fix-wrong-hint_stat-initialization-in-exfat_fi.patch

Kmods SIG 50e2b3
From d2fa0c337d97a5490190b9f3b9c73c8f9f3602a1 Mon Sep 17 00:00:00 2001
Kmods SIG 50e2b3
From: Namjae Jeon <namjae.jeon@samsung.com>
Kmods SIG 50e2b3
Date: Fri, 3 Jul 2020 11:19:46 +0900
Kmods SIG 50e2b3
Subject: [Backport d2fa0c337d97] exfat: fix wrong hint_stat initialization in
Kmods SIG 50e2b3
 exfat_find_dir_entry()
Kmods SIG 50e2b3
Kmods SIG 50e2b3
We found the wrong hint_stat initialization in exfat_find_dir_entry().
Kmods SIG 50e2b3
It should be initialized when cluster is EXFAT_EOF_CLUSTER.
Kmods SIG 50e2b3
Kmods SIG 50e2b3
Fixes: ca06197382bd ("exfat: add directory operations")
Kmods SIG 50e2b3
Cc: stable@vger.kernel.org # v5.7
Kmods SIG 50e2b3
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Kmods SIG 50e2b3
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Kmods SIG 50e2b3
---
Kmods SIG 50e2b3
 src/dir.c | 2 +-
Kmods SIG 50e2b3
 1 file changed, 1 insertion(+), 1 deletion(-)
Kmods SIG 50e2b3
Kmods SIG 50e2b3
diff --git a/src/dir.c b/src/dir.c
Kmods SIG 50e2b3
index 91ece649285d2824ff99ee5b996adeb8ff973a93..119abf0d8dd6fe5b23e1537341068f3f3060f035 100644
Kmods SIG 50e2b3
--- a/src/dir.c
Kmods SIG 50e2b3
+++ b/src/dir.c
Kmods SIG 50e2b3
@@ -1112,7 +1112,7 @@ int exfat_find_dir_entry(struct super_block *sb, struct exfat_inode_info *ei,
Kmods SIG 50e2b3
 			ret = exfat_get_next_cluster(sb, &clu.dir);
Kmods SIG 50e2b3
 		}
Kmods SIG 50e2b3
 
Kmods SIG 50e2b3
-		if (ret || clu.dir != EXFAT_EOF_CLUSTER) {
Kmods SIG 50e2b3
+		if (ret || clu.dir == EXFAT_EOF_CLUSTER) {
Kmods SIG 50e2b3
 			/* just initialized hint_stat */
Kmods SIG 50e2b3
 			hint_stat->clu = p_dir->dir;
Kmods SIG 50e2b3
 			hint_stat->eidx = 0;
Kmods SIG 50e2b3
-- 
Kmods SIG 50e2b3
2.31.1
Kmods SIG 50e2b3