diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 3766db2bb7f2..941108352547 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -849,13 +849,19 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
849 | /* BB FIXME We can not sign across two buffers yet */ | 849 | /* BB FIXME We can not sign across two buffers yet */ |
850 | if((experimEnabled) && ((pTcon->ses->server->secMode & | 850 | if((experimEnabled) && ((pTcon->ses->server->secMode & |
851 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) == 0)) { | 851 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) == 0)) { |
852 | struct kvec iov[2]; | ||
853 | unsigned int len; | ||
854 | |||
855 | len = min(cifs_sb->wsize, | ||
856 | write_size - total_written); | ||
857 | /* iov[0] is reserved for smb header */ | ||
858 | iov[1].iov_base = (char *)write_data + | ||
859 | total_written; | ||
860 | iov[1].iov_len = len; | ||
852 | rc = CIFSSMBWrite2(xid, pTcon, | 861 | rc = CIFSSMBWrite2(xid, pTcon, |
853 | open_file->netfid, | 862 | open_file->netfid, len, |
854 | min_t(const int, cifs_sb->wsize, | ||
855 | write_size - total_written), | ||
856 | *poffset, &bytes_written, | 863 | *poffset, &bytes_written, |
857 | write_data + total_written, | 864 | iov, 1, long_op); |
858 | long_op); | ||
859 | } else | 865 | } else |
860 | /* BB FIXME fixup indentation of line below */ | 866 | /* BB FIXME fixup indentation of line below */ |
861 | #endif | 867 | #endif |