--- /dev/null
+From db415f7aae07cadcabd5d2a659f8ad825c905299 Mon Sep 17 00:00:00 2001
+From: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
+Date: Thu, 16 Jul 2020 17:27:53 +0900
+Subject: exfat: fix name_hash computation on big endian systems
+
+From: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
+
+commit db415f7aae07cadcabd5d2a659f8ad825c905299 upstream.
+
+On-disk format for name_hash field is LE, so it must be explicitly
+transformed on BE system for proper result.
+
+Fixes: 370e812b3ec1 ("exfat: add nls operations")
+Cc: stable@vger.kernel.org # v5.7
+Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
+Signed-off-by: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
+Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
+Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/exfat/nls.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/fs/exfat/nls.c
++++ b/fs/exfat/nls.c
+@@ -495,7 +495,7 @@ static int exfat_utf8_to_utf16(struct su
+ struct exfat_uni_name *p_uniname, int *p_lossy)
+ {
+ int i, unilen, lossy = NLS_NAME_NO_LOSSY;
+- unsigned short upname[MAX_NAME_LENGTH + 1];
++ __le16 upname[MAX_NAME_LENGTH + 1];
+ unsigned short *uniname = p_uniname->name;
+
+ WARN_ON(!len);
+@@ -523,7 +523,7 @@ static int exfat_utf8_to_utf16(struct su
+ exfat_wstrchr(bad_uni_chars, *uniname))
+ lossy |= NLS_NAME_LOSSY;
+
+- upname[i] = exfat_toupper(sb, *uniname);
++ upname[i] = cpu_to_le16(exfat_toupper(sb, *uniname));
+ uniname++;
+ }
+
+@@ -614,7 +614,7 @@ static int exfat_nls_to_ucs2(struct supe
+ struct exfat_uni_name *p_uniname, int *p_lossy)
+ {
+ int i = 0, unilen = 0, lossy = NLS_NAME_NO_LOSSY;
+- unsigned short upname[MAX_NAME_LENGTH + 1];
++ __le16 upname[MAX_NAME_LENGTH + 1];
+ unsigned short *uniname = p_uniname->name;
+ struct nls_table *nls = EXFAT_SB(sb)->nls_io;
+
+@@ -628,7 +628,7 @@ static int exfat_nls_to_ucs2(struct supe
+ exfat_wstrchr(bad_uni_chars, *uniname))
+ lossy |= NLS_NAME_LOSSY;
+
+- upname[unilen] = exfat_toupper(sb, *uniname);
++ upname[unilen] = cpu_to_le16(exfat_toupper(sb, *uniname));
+ uniname++;
+ unilen++;
+ }
--- /dev/null
+From 43946b70494beefe40ec1b2ba4744c0f294d7736 Mon Sep 17 00:00:00 2001
+From: Namjae Jeon <namjae.jeon@samsung.com>
+Date: Fri, 3 Jul 2020 11:16:32 +0900
+Subject: exfat: fix overflow issue in exfat_cluster_to_sector()
+
+From: Namjae Jeon <namjae.jeon@samsung.com>
+
+commit 43946b70494beefe40ec1b2ba4744c0f294d7736 upstream.
+
+An overflow issue can occur while calculating sector in
+exfat_cluster_to_sector(). It needs to cast clus's type to sector_t
+before left shifting.
+
+Fixes: 1acf1a564b60 ("exfat: add in-memory and on-disk structures and headers")
+Cc: stable@vger.kernel.org # v5.7
+Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
+Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/exfat/exfat_fs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/exfat/exfat_fs.h
++++ b/fs/exfat/exfat_fs.h
+@@ -375,7 +375,7 @@ static inline bool exfat_is_last_sector_
+ static inline sector_t exfat_cluster_to_sector(struct exfat_sb_info *sbi,
+ unsigned int clus)
+ {
+- return ((clus - EXFAT_RESERVED_CLUSTERS) << sbi->sect_per_clus_bits) +
++ return ((sector_t)(clus - EXFAT_RESERVED_CLUSTERS) << sbi->sect_per_clus_bits) +
+ sbi->data_start_sector;
+ }
+
--- /dev/null
+From d2fa0c337d97a5490190b9f3b9c73c8f9f3602a1 Mon Sep 17 00:00:00 2001
+From: Namjae Jeon <namjae.jeon@samsung.com>
+Date: Fri, 3 Jul 2020 11:19:46 +0900
+Subject: exfat: fix wrong hint_stat initialization in exfat_find_dir_entry()
+
+From: Namjae Jeon <namjae.jeon@samsung.com>
+
+commit d2fa0c337d97a5490190b9f3b9c73c8f9f3602a1 upstream.
+
+We found the wrong hint_stat initialization in exfat_find_dir_entry().
+It should be initialized when cluster is EXFAT_EOF_CLUSTER.
+
+Fixes: ca06197382bd ("exfat: add directory operations")
+Cc: stable@vger.kernel.org # v5.7
+Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
+Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/exfat/dir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/exfat/dir.c
++++ b/fs/exfat/dir.c
+@@ -1160,7 +1160,7 @@ found:
+ ret = exfat_get_next_cluster(sb, &clu.dir);
+ }
+
+- if (ret || clu.dir != EXFAT_EOF_CLUSTER) {
++ if (ret || clu.dir == EXFAT_EOF_CLUSTER) {
+ /* just initialized hint_stat */
+ hint_stat->clu = p_dir->dir;
+ hint_stat->eidx = 0;
--- /dev/null
+From 41e3928f8c58184fcf0bb22e822af39a436370c7 Mon Sep 17 00:00:00 2001
+From: Hyeongseok Kim <hyeongseok@gmail.com>
+Date: Wed, 8 Jul 2020 18:52:33 +0900
+Subject: exfat: fix wrong size update of stream entry by typo
+
+From: Hyeongseok Kim <hyeongseok@gmail.com>
+
+commit 41e3928f8c58184fcf0bb22e822af39a436370c7 upstream.
+
+The stream.size field is updated to the value of create timestamp
+of the file entry. Fix this to use correct stream entry pointer.
+
+Fixes: 29bbb14bfc80 ("exfat: fix incorrect update of stream entry in __exfat_truncate()")
+Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
+Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/exfat/file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/exfat/file.c
++++ b/fs/exfat/file.c
+@@ -175,7 +175,7 @@ int __exfat_truncate(struct inode *inode
+ ep2->dentry.stream.size = 0;
+ } else {
+ ep2->dentry.stream.valid_size = cpu_to_le64(new_size);
+- ep2->dentry.stream.size = ep->dentry.stream.valid_size;
++ ep2->dentry.stream.size = ep2->dentry.stream.valid_size;
+ }
+
+ if (new_size == 0) {
dm-mpath-pass-io-start-time-to-path-selector.patch
dm-do-not-use-waitqueue-for-request-based-dm.patch
sunrpc-reverting-d03727b248d0-nfsv4-fix-close-not-waiting-for-direct-io-compeletion.patch
+exfat-fix-overflow-issue-in-exfat_cluster_to_sector.patch
+exfat-fix-wrong-hint_stat-initialization-in-exfat_find_dir_entry.patch
+exfat-fix-wrong-size-update-of-stream-entry-by-typo.patch
+exfat-fix-name_hash-computation-on-big-endian-systems.patch