aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/Kconfig35
-rw-r--r--fs/cifs/cifsfs.h2
-rw-r--r--fs/cifs/cifsglob.h5
-rw-r--r--fs/cifs/connect.c2
-rw-r--r--fs/cifs/dir.c8
-rw-r--r--fs/cifs/file.c16
-rw-r--r--fs/cifs/inode.c5
-rw-r--r--fs/cifs/link.c12
-rw-r--r--fs/cifs/netmisc.c20
-rw-r--r--fs/cifs/readdir.c4
-rw-r--r--fs/cifs/sess.c24
-rw-r--r--fs/cifs/smb1ops.c2
-rw-r--r--fs/cifs/smb2file.c2
-rw-r--r--fs/cifs/smb2inode.c2
-rw-r--r--fs/cifs/smb2maperror.c2
-rw-r--r--fs/cifs/smb2ops.c4
-rw-r--r--fs/cifs/smb2pdu.c7
17 files changed, 88 insertions, 64 deletions
diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
index 603f18a65c12..a2172f3f69e3 100644
--- a/fs/cifs/Kconfig
+++ b/fs/cifs/Kconfig
@@ -22,6 +22,11 @@ config CIFS
22 support for OS/2 and Windows ME and similar servers is provided as 22 support for OS/2 and Windows ME and similar servers is provided as
23 well. 23 well.
24 24
25 The module also provides optional support for the followon
26 protocols for CIFS including SMB3, which enables
27 useful performance and security features (see the description
28 of CONFIG_CIFS_SMB2).
29
25 The cifs module provides an advanced network file system 30 The cifs module provides an advanced network file system
26 client for mounting to CIFS compliant servers. It includes 31 client for mounting to CIFS compliant servers. It includes
27 support for DFS (hierarchical name space), secure per-user 32 support for DFS (hierarchical name space), secure per-user
@@ -121,7 +126,8 @@ config CIFS_ACL
121 depends on CIFS_XATTR && KEYS 126 depends on CIFS_XATTR && KEYS
122 help 127 help
123 Allows fetching CIFS/NTFS ACL from the server. The DACL blob 128 Allows fetching CIFS/NTFS ACL from the server. The DACL blob
124 is handed over to the application/caller. 129 is handed over to the application/caller. See the man
130 page for getcifsacl for more information.
125 131
126config CIFS_DEBUG 132config CIFS_DEBUG
127 bool "Enable CIFS debugging routines" 133 bool "Enable CIFS debugging routines"
@@ -162,7 +168,7 @@ config CIFS_NFSD_EXPORT
162 Allows NFS server to export a CIFS mounted share (nfsd over cifs) 168 Allows NFS server to export a CIFS mounted share (nfsd over cifs)
163 169
164config CIFS_SMB2 170config CIFS_SMB2
165 bool "SMB2 network file system support" 171 bool "SMB2 and SMB3 network file system support"
166 depends on CIFS && INET 172 depends on CIFS && INET
167 select NLS 173 select NLS
168 select KEYS 174 select KEYS
@@ -170,16 +176,21 @@ config CIFS_SMB2
170 select DNS_RESOLVER 176 select DNS_RESOLVER
171 177
172 help 178 help
173 This enables experimental support for the SMB2 (Server Message Block 179 This enables support for the Server Message Block version 2
174 version 2) protocol. The SMB2 protocol is the successor to the 180 family of protocols, including SMB3. SMB3 support is
175 popular CIFS and SMB network file sharing protocols. SMB2 is the 181 enabled on mount by specifying "vers=3.0" in the mount
176 native file sharing mechanism for recent versions of Windows 182 options. These protocols are the successors to the popular
177 operating systems (since Vista). SMB2 enablement will eventually 183 CIFS and SMB network file sharing protocols. SMB3 is the
178 allow users better performance, security and features, than would be 184 native file sharing mechanism for the more recent
179 possible with cifs. Note that smb2 mount options also are simpler 185 versions of Windows (Windows 8 and Windows 2012 and
180 (compared to cifs) due to protocol improvements. 186 later) and Samba server and many others support SMB3 well.
181 187 In general SMB3 enables better performance, security
182 Unless you are a developer or tester, say N. 188 and features, than would be possible with CIFS (Note that
189 when mounting to Samba, due to the CIFS POSIX extensions,
190 CIFS mounts can provide slightly better POSIX compatibility
191 than SMB3 mounts do though). Note that SMB2/SMB3 mount
192 options are also slightly simpler (compared to CIFS) due
193 to protocol improvements.
183 194
184config CIFS_FSCACHE 195config CIFS_FSCACHE
185 bool "Provide CIFS client caching support" 196 bool "Provide CIFS client caching support"
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index b0fafa499505..002e0c173939 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -136,5 +136,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
136extern const struct export_operations cifs_export_ops; 136extern const struct export_operations cifs_export_ops;
137#endif /* CONFIG_CIFS_NFSD_EXPORT */ 137#endif /* CONFIG_CIFS_NFSD_EXPORT */
138 138
139#define CIFS_VERSION "2.04" 139#define CIFS_VERSION "2.05"
140#endif /* _CIFSFS_H */ 140#endif /* _CIFSFS_H */
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index dfc731b02aa9..25b8392bfdd2 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -70,11 +70,6 @@
70#define SERVER_NAME_LENGTH 40 70#define SERVER_NAME_LENGTH 40
71#define SERVER_NAME_LEN_WITH_NULL (SERVER_NAME_LENGTH + 1) 71#define SERVER_NAME_LEN_WITH_NULL (SERVER_NAME_LENGTH + 1)
72 72
73/* used to define string lengths for reversing unicode strings */
74/* (256+1)*2 = 514 */
75/* (max path length + 1 for null) * 2 for unicode */
76#define MAX_NAME 514
77
78/* SMB echo "timeout" -- FIXME: tunable? */ 73/* SMB echo "timeout" -- FIXME: tunable? */
79#define SMB_ECHO_INTERVAL (60 * HZ) 74#define SMB_ECHO_INTERVAL (60 * HZ)
80 75
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 03ed8a09581c..36ca2045009b 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1600,6 +1600,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1600 tmp_end++; 1600 tmp_end++;
1601 if (!(tmp_end < end && tmp_end[1] == delim)) { 1601 if (!(tmp_end < end && tmp_end[1] == delim)) {
1602 /* No it is not. Set the password to NULL */ 1602 /* No it is not. Set the password to NULL */
1603 kfree(vol->password);
1603 vol->password = NULL; 1604 vol->password = NULL;
1604 break; 1605 break;
1605 } 1606 }
@@ -1637,6 +1638,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1637 options = end; 1638 options = end;
1638 } 1639 }
1639 1640
1641 kfree(vol->password);
1640 /* Now build new password string */ 1642 /* Now build new password string */
1641 temp_len = strlen(value); 1643 temp_len = strlen(value);
1642 vol->password = kzalloc(temp_len+1, GFP_KERNEL); 1644 vol->password = kzalloc(temp_len+1, GFP_KERNEL);
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 3db0c5fd9a11..6cbd9c688cfe 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -497,6 +497,14 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
497 goto out; 497 goto out;
498 } 498 }
499 499
500 if (file->f_flags & O_DIRECT &&
501 CIFS_SB(inode->i_sb)->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) {
502 if (CIFS_SB(inode->i_sb)->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
503 file->f_op = &cifs_file_direct_nobrl_ops;
504 else
505 file->f_op = &cifs_file_direct_ops;
506 }
507
500 file_info = cifs_new_fileinfo(&fid, file, tlink, oplock); 508 file_info = cifs_new_fileinfo(&fid, file, tlink, oplock);
501 if (file_info == NULL) { 509 if (file_info == NULL) {
502 if (server->ops->close) 510 if (server->ops->close)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index d5fec92e0360..5f29354b072a 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -467,6 +467,14 @@ int cifs_open(struct inode *inode, struct file *file)
467 cifs_dbg(FYI, "inode = 0x%p file flags are 0x%x for %s\n", 467 cifs_dbg(FYI, "inode = 0x%p file flags are 0x%x for %s\n",
468 inode, file->f_flags, full_path); 468 inode, file->f_flags, full_path);
469 469
470 if (file->f_flags & O_DIRECT &&
471 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) {
472 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
473 file->f_op = &cifs_file_direct_nobrl_ops;
474 else
475 file->f_op = &cifs_file_direct_ops;
476 }
477
470 if (server->oplocks) 478 if (server->oplocks)
471 oplock = REQ_OPLOCK; 479 oplock = REQ_OPLOCK;
472 else 480 else
@@ -3560,15 +3568,9 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
3560 lru_cache_add_file(page); 3568 lru_cache_add_file(page);
3561 unlock_page(page); 3569 unlock_page(page);
3562 page_cache_release(page); 3570 page_cache_release(page);
3563 if (rc == -EAGAIN)
3564 list_add_tail(&page->lru, &tmplist);
3565 } 3571 }
3572 /* Fallback to the readpage in error/reconnect cases */
3566 kref_put(&rdata->refcount, cifs_readdata_release); 3573 kref_put(&rdata->refcount, cifs_readdata_release);
3567 if (rc == -EAGAIN) {
3568 /* Re-add pages to the page_list and retry */
3569 list_splice(&tmplist, page_list);
3570 continue;
3571 }
3572 break; 3574 break;
3573 } 3575 }
3574 3576
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 949ec909ec9a..7899a40465b3 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1720,7 +1720,10 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry,
1720unlink_target: 1720unlink_target:
1721 /* Try unlinking the target dentry if it's not negative */ 1721 /* Try unlinking the target dentry if it's not negative */
1722 if (target_dentry->d_inode && (rc == -EACCES || rc == -EEXIST)) { 1722 if (target_dentry->d_inode && (rc == -EACCES || rc == -EEXIST)) {
1723 tmprc = cifs_unlink(target_dir, target_dentry); 1723 if (d_is_dir(target_dentry))
1724 tmprc = cifs_rmdir(target_dir, target_dentry);
1725 else
1726 tmprc = cifs_unlink(target_dir, target_dentry);
1724 if (tmprc) 1727 if (tmprc)
1725 goto cifs_rename_exit; 1728 goto cifs_rename_exit;
1726 rc = cifs_do_rename(xid, source_dentry, from_name, 1729 rc = cifs_do_rename(xid, source_dentry, from_name,
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index 68559fd557fb..5657416d3483 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -213,8 +213,12 @@ create_mf_symlink(const unsigned int xid, struct cifs_tcon *tcon,
213 if (rc) 213 if (rc)
214 goto out; 214 goto out;
215 215
216 rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon, cifs_sb, 216 if (tcon->ses->server->ops->create_mf_symlink)
217 fromName, buf, &bytes_written); 217 rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon,
218 cifs_sb, fromName, buf, &bytes_written);
219 else
220 rc = -EOPNOTSUPP;
221
218 if (rc) 222 if (rc)
219 goto out; 223 goto out;
220 224
@@ -339,9 +343,11 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
339 if (rc) 343 if (rc)
340 return rc; 344 return rc;
341 345
342 if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) 346 if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
347 rc = -ENOENT;
343 /* it's not a symlink */ 348 /* it's not a symlink */
344 goto out; 349 goto out;
350 }
345 351
346 io_parms.netfid = fid.netfid; 352 io_parms.netfid = fid.netfid;
347 io_parms.pid = current->tgid; 353 io_parms.pid = current->tgid;
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 6834b9c3bec1..b333ff60781d 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -925,11 +925,23 @@ cifs_NTtimeToUnix(__le64 ntutc)
925 /* BB what about the timezone? BB */ 925 /* BB what about the timezone? BB */
926 926
927 /* Subtract the NTFS time offset, then convert to 1s intervals. */ 927 /* Subtract the NTFS time offset, then convert to 1s intervals. */
928 u64 t; 928 s64 t = le64_to_cpu(ntutc) - NTFS_TIME_OFFSET;
929
930 /*
931 * Unfortunately can not use normal 64 bit division on 32 bit arch, but
932 * the alternative, do_div, does not work with negative numbers so have
933 * to special case them
934 */
935 if (t < 0) {
936 t = -t;
937 ts.tv_nsec = (long)(do_div(t, 10000000) * 100);
938 ts.tv_nsec = -ts.tv_nsec;
939 ts.tv_sec = -t;
940 } else {
941 ts.tv_nsec = (long)do_div(t, 10000000) * 100;
942 ts.tv_sec = t;
943 }
929 944
930 t = le64_to_cpu(ntutc) - NTFS_TIME_OFFSET;
931 ts.tv_nsec = do_div(t, 10000000) * 100;
932 ts.tv_sec = t;
933 return ts; 945 return ts;
934} 946}
935 947
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 798c80a41c88..b334a89d6a66 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -596,8 +596,8 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
596 if (server->ops->dir_needs_close(cfile)) { 596 if (server->ops->dir_needs_close(cfile)) {
597 cfile->invalidHandle = true; 597 cfile->invalidHandle = true;
598 spin_unlock(&cifs_file_list_lock); 598 spin_unlock(&cifs_file_list_lock);
599 if (server->ops->close) 599 if (server->ops->close_dir)
600 server->ops->close(xid, tcon, &cfile->fid); 600 server->ops->close_dir(xid, tcon, &cfile->fid);
601 } else 601 } else
602 spin_unlock(&cifs_file_list_lock); 602 spin_unlock(&cifs_file_list_lock);
603 if (cfile->srch_inf.ntwrk_buf_start) { 603 if (cfile->srch_inf.ntwrk_buf_start) {
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 39ee32688eac..57db63ff88da 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -243,10 +243,11 @@ static void decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
243 kfree(ses->serverOS); 243 kfree(ses->serverOS);
244 244
245 ses->serverOS = kzalloc(len + 1, GFP_KERNEL); 245 ses->serverOS = kzalloc(len + 1, GFP_KERNEL);
246 if (ses->serverOS) 246 if (ses->serverOS) {
247 strncpy(ses->serverOS, bcc_ptr, len); 247 strncpy(ses->serverOS, bcc_ptr, len);
248 if (strncmp(ses->serverOS, "OS/2", 4) == 0) 248 if (strncmp(ses->serverOS, "OS/2", 4) == 0)
249 cifs_dbg(FYI, "OS/2 server\n"); 249 cifs_dbg(FYI, "OS/2 server\n");
250 }
250 251
251 bcc_ptr += len + 1; 252 bcc_ptr += len + 1;
252 bleft -= len + 1; 253 bleft -= len + 1;
@@ -744,14 +745,6 @@ out:
744 sess_free_buffer(sess_data); 745 sess_free_buffer(sess_data);
745} 746}
746 747
747#else
748
749static void
750sess_auth_lanman(struct sess_data *sess_data)
751{
752 sess_data->result = -EOPNOTSUPP;
753 sess_data->func = NULL;
754}
755#endif 748#endif
756 749
757static void 750static void
@@ -1102,15 +1095,6 @@ out:
1102 ses->auth_key.response = NULL; 1095 ses->auth_key.response = NULL;
1103} 1096}
1104 1097
1105#else
1106
1107static void
1108sess_auth_kerberos(struct sess_data *sess_data)
1109{
1110 cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n");
1111 sess_data->result = -ENOSYS;
1112 sess_data->func = NULL;
1113}
1114#endif /* ! CONFIG_CIFS_UPCALL */ 1098#endif /* ! CONFIG_CIFS_UPCALL */
1115 1099
1116/* 1100/*
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
index 1a6df4b03f67..52131d8cb4d5 100644
--- a/fs/cifs/smb1ops.c
+++ b/fs/cifs/smb1ops.c
@@ -586,7 +586,7 @@ cifs_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
586 tmprc = CIFS_open(xid, &oparms, &oplock, NULL); 586 tmprc = CIFS_open(xid, &oparms, &oplock, NULL);
587 if (tmprc == -EOPNOTSUPP) 587 if (tmprc == -EOPNOTSUPP)
588 *symlink = true; 588 *symlink = true;
589 else 589 else if (tmprc == 0)
590 CIFSSMBClose(xid, tcon, fid.netfid); 590 CIFSSMBClose(xid, tcon, fid.netfid);
591 } 591 }
592 592
diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
index 3f17b4550831..45992944e238 100644
--- a/fs/cifs/smb2file.c
+++ b/fs/cifs/smb2file.c
@@ -50,7 +50,7 @@ smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms,
50 goto out; 50 goto out;
51 } 51 }
52 52
53 smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + MAX_NAME * 2, 53 smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + PATH_MAX * 2,
54 GFP_KERNEL); 54 GFP_KERNEL);
55 if (smb2_data == NULL) { 55 if (smb2_data == NULL) {
56 rc = -ENOMEM; 56 rc = -ENOMEM;
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,
131 *adjust_tz = false; 131 *adjust_tz = false;
132 *symlink = false; 132 *symlink = false;
133 133
134 smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + MAX_NAME * 2, 134 smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + PATH_MAX * 2,
135 GFP_KERNEL); 135 GFP_KERNEL);
136 if (smb2_data == NULL) 136 if (smb2_data == NULL)
137 return -ENOMEM; 137 return -ENOMEM;
diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c
index af59d03db492..8257a5a97cc0 100644
--- a/fs/cifs/smb2maperror.c
+++ b/fs/cifs/smb2maperror.c
@@ -256,6 +256,8 @@ static const struct status_to_posix_error smb2_error_map_table[] = {
256 {STATUS_DLL_MIGHT_BE_INCOMPATIBLE, -EIO, 256 {STATUS_DLL_MIGHT_BE_INCOMPATIBLE, -EIO,
257 "STATUS_DLL_MIGHT_BE_INCOMPATIBLE"}, 257 "STATUS_DLL_MIGHT_BE_INCOMPATIBLE"},
258 {STATUS_STOPPED_ON_SYMLINK, -EOPNOTSUPP, "STATUS_STOPPED_ON_SYMLINK"}, 258 {STATUS_STOPPED_ON_SYMLINK, -EOPNOTSUPP, "STATUS_STOPPED_ON_SYMLINK"},
259 {STATUS_IO_REPARSE_TAG_NOT_HANDLED, -EOPNOTSUPP,
260 "STATUS_REPARSE_NOT_HANDLED"},
259 {STATUS_DEVICE_REQUIRES_CLEANING, -EIO, 261 {STATUS_DEVICE_REQUIRES_CLEANING, -EIO,
260 "STATUS_DEVICE_REQUIRES_CLEANING"}, 262 "STATUS_DEVICE_REQUIRES_CLEANING"},
261 {STATUS_DEVICE_DOOR_OPEN, -EIO, "STATUS_DEVICE_DOOR_OPEN"}, 263 {STATUS_DEVICE_DOOR_OPEN, -EIO, "STATUS_DEVICE_DOOR_OPEN"},
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 5a48aa290dfe..f522193b7184 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -389,7 +389,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
389 int rc; 389 int rc;
390 struct smb2_file_all_info *smb2_data; 390 struct smb2_file_all_info *smb2_data;
391 391
392 smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + MAX_NAME * 2, 392 smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + PATH_MAX * 2,
393 GFP_KERNEL); 393 GFP_KERNEL);
394 if (smb2_data == NULL) 394 if (smb2_data == NULL)
395 return -ENOMEM; 395 return -ENOMEM;
@@ -1035,7 +1035,7 @@ static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
1035 if (keep_size == false) 1035 if (keep_size == false)
1036 return -EOPNOTSUPP; 1036 return -EOPNOTSUPP;
1037 1037
1038 /* 1038 /*
1039 * Must check if file sparse since fallocate -z (zero range) assumes 1039 * Must check if file sparse since fallocate -z (zero range) assumes
1040 * non-sparse allocation 1040 * non-sparse allocation
1041 */ 1041 */
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index fa0dd044213b..74b3a6684383 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -530,7 +530,7 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses,
530 struct smb2_sess_setup_rsp *rsp = NULL; 530 struct smb2_sess_setup_rsp *rsp = NULL;
531 struct kvec iov[2]; 531 struct kvec iov[2];
532 int rc = 0; 532 int rc = 0;
533 int resp_buftype; 533 int resp_buftype = CIFS_NO_BUFFER;
534 __le32 phase = NtLmNegotiate; /* NTLMSSP, if needed, is multistage */ 534 __le32 phase = NtLmNegotiate; /* NTLMSSP, if needed, is multistage */
535 struct TCP_Server_Info *server = ses->server; 535 struct TCP_Server_Info *server = ses->server;
536 u16 blob_length = 0; 536 u16 blob_length = 0;
@@ -1403,8 +1403,7 @@ SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
1403 rsp = (struct smb2_close_rsp *)iov[0].iov_base; 1403 rsp = (struct smb2_close_rsp *)iov[0].iov_base;
1404 1404
1405 if (rc != 0) { 1405 if (rc != 0) {
1406 if (tcon) 1406 cifs_stats_fail_inc(tcon, SMB2_CLOSE_HE);
1407 cifs_stats_fail_inc(tcon, SMB2_CLOSE_HE);
1408 goto close_exit; 1407 goto close_exit;
1409 } 1408 }
1410 1409
@@ -1533,7 +1532,7 @@ SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon,
1533{ 1532{
1534 return query_info(xid, tcon, persistent_fid, volatile_fid, 1533 return query_info(xid, tcon, persistent_fid, volatile_fid,
1535 FILE_ALL_INFORMATION, 1534 FILE_ALL_INFORMATION,
1536 sizeof(struct smb2_file_all_info) + MAX_NAME * 2, 1535 sizeof(struct smb2_file_all_info) + PATH_MAX * 2,
1537 sizeof(struct smb2_file_all_info), data); 1536 sizeof(struct smb2_file_all_info), data);
1538} 1537}
1539 1538