diff options
author | Steve French <sfrench@us.ibm.com> | 2005-10-10 10:57:19 -0700 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-10-10 10:57:19 -0700 |
commit | 0ae0efada36219024e4e3008f16c993d5d091280 (patch) | |
tree | 65e5f46068b31f3d5163e34eec578753f8f99117 /fs/cifs/file.c | |
parent | 68058e757573d4e81550e74c5a03a29a29069ce7 (diff) |
[CIFS] Fix rsize calculation so that large readx flag is checked.
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 39b23f4fa6c3..11806c879c47 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -855,7 +855,7 @@ static ssize_t cifs_write(struct file *file, const char *write_data, struct kvec iov[2]; unsigned int len; - len = min(cifs_sb->wsize, + len = min((size_t)cifs_sb->wsize, write_size - total_written); /* iov[0] is reserved for smb header */ iov[1].iov_base = (char *)write_data + @@ -920,7 +920,8 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode) ((open_file->pfile->f_flags & O_RDWR) || (open_file->pfile->f_flags & O_WRONLY))) { read_unlock(&GlobalSMBSeslock); - if(open_file->invalidHandle) { + if((open_file->invalidHandle) && + (!open_file->closePend)) { rc = cifs_reopen_file(&cifs_inode->vfs_inode, open_file->pfile, FALSE); /* if it fails, try another handle - might be */ |