diff options
author | Steve French <sfrench@us.ibm.com> | 2005-06-13 14:24:43 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-06-13 14:24:43 -0400 |
commit | d6e04ae64c6b06ef76a5d4fb49106b393b7fa50a (patch) | |
tree | 0ae0d4e7c94ccbba95e55d7512eb628d845eff20 /fs/cifs/file.c | |
parent | 2830077f7ae93ef2f7a312e3e489110963612e77 (diff) |
[CIFS] CIFS writepage improvements - eliminate double copy
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index dde2d251fc3d..ca74c1151be9 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -791,9 +791,8 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
791 | 791 | ||
792 | pTcon = cifs_sb->tcon; | 792 | pTcon = cifs_sb->tcon; |
793 | 793 | ||
794 | /* cFYI(1, | 794 | cFYI(1,(" write %d bytes to offset %lld of %s", write_size, |
795 | (" write %d bytes to offset %lld of %s", write_size, | 795 | *poffset, file->f_dentry->d_name.name)); /* BB removeme BB */ |
796 | *poffset, file->f_dentry->d_name.name)); */ | ||
797 | 796 | ||
798 | if (file->private_data == NULL) | 797 | if (file->private_data == NULL) |
799 | return -EBADF; | 798 | return -EBADF; |
@@ -846,7 +845,21 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
846 | if (rc != 0) | 845 | if (rc != 0) |
847 | break; | 846 | break; |
848 | } | 847 | } |
849 | 848 | #ifdef CIFS_EXPERIMENTAL | |
849 | /* BB FIXME We can not sign across two buffers yet */ | ||
850 | cERROR(1,("checking signing")); /* BB removeme BB */ | ||
851 | if(pTcon->ses->server->secMode & | ||
852 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED) == 0) | ||
853 | rc = CIFSSMBWrite2(xid, pTcon, | ||
854 | open_file->netfid, | ||
855 | min_t(const int, cifs_sb->wsize, | ||
856 | write_size - total_written), | ||
857 | *poffset, &bytes_written, | ||
858 | write_data + total_written, | ||
859 | long_op); | ||
860 | } else | ||
861 | /* BB FIXME fixup indentation of line below */ | ||
862 | #endif | ||
850 | rc = CIFSSMBWrite(xid, pTcon, | 863 | rc = CIFSSMBWrite(xid, pTcon, |
851 | open_file->netfid, | 864 | open_file->netfid, |
852 | min_t(const int, cifs_sb->wsize, | 865 | min_t(const int, cifs_sb->wsize, |