From: Steve French Date: Sun, 27 Aug 2017 21:56:08 +0000 (-0500) Subject: CIFS: remove endian related sparse warning X-Git-Tag: v3.2.95~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70e9d1906a0fc524bd8d8ba371debb3abcb8cf5b;p=thirdparty%2Fkernel%2Fstable.git 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 CC: Ronnie Sahlberg Acked-by: Pavel Shilovsky [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 1c4b50fba74a4..a1c99c4e7763b 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -522,7 +522,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, /* Don't allow path components longer than the server max. */ if (unlikely(direntry->d_name.len > - pTcon->fsAttrInfo.MaxPathNameComponentLength)) { + le32_to_cpu(pTcon->fsAttrInfo.MaxPathNameComponentLength))) { rc = -ENAMETOOLONG; goto lookup_out; }