summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2017-08-27 16:56:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-07 08:34:09 +0200
commit5f08f0aebf7084ad1c6359c22adb104fa006889c (patch)
treebe7aab9594388d7a89493448b186c22629e2f2bc /fs
parente596cc1454d4ca3ab1e233b9a89d3e44d7062f4e (diff)
downloadlinux-stable-5f08f0aebf7084ad1c6359c22adb104fa006889c.tar.gz
linux-stable-5f08f0aebf7084ad1c6359c22adb104fa006889c.tar.bz2
linux-stable-5f08f0aebf7084ad1c6359c22adb104fa006889c.zip
CIFS: remove endian related sparse warning
commit 6e3c1529c39e92ed64ca41d53abadabbaa1d5393 upstream. Recent patch had an endian warning ie cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup() Signed-off-by: Steve French <smfrench@gmail.com> CC: Ronnie Sahlberg <lsahlber@redhat.com> Acked-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index fa8df3fef6fc..297e05c9e2b0 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -194,7 +194,7 @@ check_name(struct dentry *direntry, struct cifs_tcon *tcon)
int i;
if (unlikely(direntry->d_name.len >
- tcon->fsAttrInfo.MaxPathNameComponentLength))
+ le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength)))
return -ENAMETOOLONG;
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) {