aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,
1754 1754
1755/* need to free smb_read_data buf before exit */ 1755/* need to free smb_read_data buf before exit */
1756 if (smb_read_data) { 1756 if (smb_read_data) {
1757 cifs_buf_release(smb_read_data); 1757 if(buf_type == CIFS_SMALL_BUFFER)
1758 cifs_small_buf_release(smb_read_data);
1759 else if(buf_type == CIFS_LARGE_BUFFER)
1760 cifs_buf_release(smb_read_data);
1758 smb_read_data = NULL; 1761 smb_read_data = NULL;
1759 } 1762 }
1760 1763