summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-01-18 23:20:39 +0100
committerSteve French <sfrench@us.ibm.com>2006-01-18 23:20:39 +0100
commit47c886b3123a335f0622136e021e7691d60d742c (patch)
treef8fb888829092493333e1cd63389f7cff39fdecd /fs
parentMerge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git (diff)
downloadlinux-47c886b3123a335f0622136e021e7691d60d742c.tar.xz
linux-47c886b3123a335f0622136e021e7691d60d742c.zip
[CIFS] Fix oops in cifs_readpages caused by not checking buf_type in an
error path of new cifs_readpages code. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 378095a442d0..77c990f0cb98 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1754,7 +1754,10 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
/* need to free smb_read_data buf before exit */
if (smb_read_data) {
- cifs_buf_release(smb_read_data);
+ if(buf_type == CIFS_SMALL_BUFFER)
+ cifs_small_buf_release(smb_read_data);
+ else if(buf_type == CIFS_LARGE_BUFFER)
+ cifs_buf_release(smb_read_data);
smb_read_data = NULL;
}