summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2inode.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2014-08-22 13:32:11 +0400
committerSteve French <smfrench@gmail.com>2014-08-25 16:45:17 -0500
commit1bbe4997b13de903c421c1cc78440e544b5f9064 (patch)
treebbb98099a72fddd841a64b570355fbe5584fb7db /fs/cifs/smb2inode.c
parentf736906a7669a77cf8cabdcbcf1dc8cb694e12ef (diff)
downloadtalos-obmc-linux-1bbe4997b13de903c421c1cc78440e544b5f9064.tar.gz
talos-obmc-linux-1bbe4997b13de903c421c1cc78440e544b5f9064.zip
CIFS: Fix wrong filename length for SMB2
The existing code uses the old MAX_NAME constant. This causes XFS test generic/013 to fail. Fix it by replacing MAX_NAME with PATH_MAX that SMB1 uses. Also remove an unused MAX_NAME constant definition. Cc: <stable@vger.kernel.org> # v3.7+ Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2inode.c')
-rw-r--r--fs/cifs/smb2inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
index 0150182a4494..899bbc86f73e 100644
--- a/fs/cifs/smb2inode.c
+++ b/fs/cifs/smb2inode.c
@@ -131,7 +131,7 @@ smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
*adjust_tz = false;
*symlink = false;
- smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + MAX_NAME * 2,
+ smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + PATH_MAX * 2,
GFP_KERNEL);
if (smb2_data == NULL)
return -ENOMEM;
OpenPOWER on IntegriCloud