From 70e9d1906a0fc524bd8d8ba371debb3abcb8cf5b Mon Sep 17 00:00:00 2001 From: Steve French Date: Sun, 27 Aug 2017 16:56:08 -0500 Subject: [PATCH] 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 --- fs/cifs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 1c4b50fba74a..a1c99c4e7763 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; } -- 2.39.2