summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2017-08-28 00:56:08 +0300
committerBen Hutchings <ben@decadent.org.uk>2017-11-11 16:34:36 +0300
commit70e9d1906a0fc524bd8d8ba371debb3abcb8cf5b (patch)
tree79fca87c398688ab96bd0c703f258bedfef61c86
parent3a8d1a0bec2f09ad46e03850abfb3bfd3fe7aeda (diff)
downloadlinux-70e9d1906a0fc524bd8d8ba371debb3abcb8cf5b.tar.xz
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> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-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 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;
}