[PATCH] CIFS: CIFSSMBRead was returning an invalid pointer in buf on socket error
[sfrench/cifs-2.6.git] / fs / cifs / connect.c
index e488603fb1e77f29c601e7892d6f683d9e43b804..ef5ae6f93c75daa4129128095a0cd0c490d949da 100644 (file)
@@ -1795,10 +1795,10 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
                           conjunction with 52K kvec constraint on arch with 4K
                           page size  */
 
                           conjunction with 52K kvec constraint on arch with 4K
                           page size  */
 
-               if(cifs_sb->rsize < PAGE_CACHE_SIZE) {
-                       cifs_sb->rsize = PAGE_CACHE_SIZE
-                       /* Windows ME does this */
-                       cFYI(1,("Attempt to set readsize for mount to less than one page (4096)"));
+               if(cifs_sb->rsize < 2048) {
+                       cifs_sb->rsize = 2048
+                       /* Windows ME may prefer this */
+                       cFYI(1,("readsize set to minimum 2048"));
                }
                cifs_sb->mnt_uid = volume_info.linux_uid;
                cifs_sb->mnt_gid = volume_info.linux_gid;
                }
                cifs_sb->mnt_uid = volume_info.linux_uid;
                cifs_sb->mnt_gid = volume_info.linux_gid;