[CIFS] Add support for legacy servers part 5

Handle small negotiated read sizes (under 4K) and finish up
read and write support.

Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French
2005-08-31 21:50:37 -07:00
parent 1c9551878c
commit bfa0d75a1e
5 changed files with 39 additions and 137 deletions

View File

@@ -200,7 +200,10 @@ static void fill_in_inode(struct inode *tmp_inode,
if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
tmp_inode->i_fop->lock = NULL;
tmp_inode->i_data.a_ops = &cifs_addr_ops;
if((cifs_sb->tcon) && (cifs_sb->tcon->ses) &&
(cifs_sb->tcon->ses->server->maxBuf <
4096 + MAX_CIFS_HDR_SIZE))
tmp_inode->i_data.a_ops->readpages = NULL;
if(isNewInode)
return; /* No sense invalidating pages for new inode
since have not started caching readahead file
@@ -306,6 +309,10 @@ static void unix_fill_in_inode(struct inode *tmp_inode,
if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
tmp_inode->i_fop->lock = NULL;
tmp_inode->i_data.a_ops = &cifs_addr_ops;
if((cifs_sb->tcon) && (cifs_sb->tcon->ses) &&
(cifs_sb->tcon->ses->server->maxBuf <
4096 + MAX_CIFS_HDR_SIZE))
tmp_inode->i_data.a_ops->readpages = NULL;
if(isNewInode)
return; /* No sense invalidating pages for new inode since we