aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-10-05 18:14:33 -0400
committerSteve French <sfrench@us.ibm.com>2005-10-05 18:14:33 -0400
commit4a77118cd5018fec11bf86f6f8d659352ad9a92b (patch)
treeeab48dadfdf7398815b2bba5de93ff2332727386 /fs/cifs/file.c
parent37c0eb4677f733a773df6287b0f73f00274402e3 (diff)
CIFS: Allow wsize to exceed CIFSMaxBufSize
This allows cifs_writepages to send data in larger chunks from the page cache, without requiring larger memory allocations in other cases. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 0473b221f643..0f66ae5b694b 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -925,6 +925,7 @@ static struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode)
925 /* if it fails, try another handle - might be */ 925 /* if it fails, try another handle - might be */
926 /* dangerous to hold up writepages with retry */ 926 /* dangerous to hold up writepages with retry */
927 if(rc) { 927 if(rc) {
928 cFYI(1,("failed on reopen file in wp"));
928 read_lock(&GlobalSMBSeslock); 929 read_lock(&GlobalSMBSeslock);
929 continue; 930 continue;
930 } 931 }
@@ -1028,6 +1029,13 @@ static int cifs_writepages(struct address_space *mapping,
1028 if (cifs_sb->wsize < PAGE_CACHE_SIZE) 1029 if (cifs_sb->wsize < PAGE_CACHE_SIZE)
1029 return generic_writepages(mapping, wbc); 1030 return generic_writepages(mapping, wbc);
1030 1031
1032 /* BB FIXME we do not have code to sign across multiple buffers yet,
1033 so go to older writepage style write which we can sign if needed */
1034 if((cifs_sb->tcon->ses) && (cifs_sb->tcon->ses->server))
1035 if(cifs_sb->tcon->ses->server->secMode &
1036 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
1037 return generic_writepages(mapping, wbc);
1038
1031 /* 1039 /*
1032 * BB: Is this meaningful for a non-block-device file system? 1040 * BB: Is this meaningful for a non-block-device file system?
1033 * If it is, we should test it again after we do I/O 1041 * If it is, we should test it again after we do I/O