diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-03-14 05:26:45 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-03-14 05:26:45 -0400 |
commit | 9e294427f6e427dbaf46140303acded06365f53c (patch) | |
tree | 0669100cbd79fe8612463900171c98873d8dc454 /fs/cifs/smb2pdu.c | |
parent | 23600969ff137cf4c3bc9098f77e381de334e3f7 (diff) | |
parent | fa389e220254c69ffae0d403eac4146171062d08 (diff) |
Merge tag 'v3.14-rc6' into devel
Linux 3.14-rc6
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 2013234b73ad..860344701067 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -413,7 +413,9 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses) | |||
413 | 413 | ||
414 | /* SMB2 only has an extended negflavor */ | 414 | /* SMB2 only has an extended negflavor */ |
415 | server->negflavor = CIFS_NEGFLAVOR_EXTENDED; | 415 | server->negflavor = CIFS_NEGFLAVOR_EXTENDED; |
416 | server->maxBuf = le32_to_cpu(rsp->MaxTransactSize); | 416 | /* set it to the maximum buffer size value we can send with 1 credit */ |
417 | server->maxBuf = min_t(unsigned int, le32_to_cpu(rsp->MaxTransactSize), | ||
418 | SMB2_MAX_BUFFER_SIZE); | ||
417 | server->max_read = le32_to_cpu(rsp->MaxReadSize); | 419 | server->max_read = le32_to_cpu(rsp->MaxReadSize); |
418 | server->max_write = le32_to_cpu(rsp->MaxWriteSize); | 420 | server->max_write = le32_to_cpu(rsp->MaxWriteSize); |
419 | /* BB Do we need to validate the SecurityMode? */ | 421 | /* BB Do we need to validate the SecurityMode? */ |
@@ -1890,7 +1892,8 @@ smb2_writev_callback(struct mid_q_entry *mid) | |||
1890 | 1892 | ||
1891 | /* smb2_async_writev - send an async write, and set up mid to handle result */ | 1893 | /* smb2_async_writev - send an async write, and set up mid to handle result */ |
1892 | int | 1894 | int |
1893 | smb2_async_writev(struct cifs_writedata *wdata) | 1895 | smb2_async_writev(struct cifs_writedata *wdata, |
1896 | void (*release)(struct kref *kref)) | ||
1894 | { | 1897 | { |
1895 | int rc = -EACCES; | 1898 | int rc = -EACCES; |
1896 | struct smb2_write_req *req = NULL; | 1899 | struct smb2_write_req *req = NULL; |
@@ -1938,7 +1941,7 @@ smb2_async_writev(struct cifs_writedata *wdata) | |||
1938 | smb2_writev_callback, wdata, 0); | 1941 | smb2_writev_callback, wdata, 0); |
1939 | 1942 | ||
1940 | if (rc) { | 1943 | if (rc) { |
1941 | kref_put(&wdata->refcount, cifs_writedata_release); | 1944 | kref_put(&wdata->refcount, release); |
1942 | cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); | 1945 | cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); |
1943 | } | 1946 | } |
1944 | 1947 | ||