diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 88f60aa52058..2a0c1f4ca0ae 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -630,7 +630,7 @@ multi_t2_fnd: | |||
630 | smallbuf = NULL; | 630 | smallbuf = NULL; |
631 | } | 631 | } |
632 | wake_up_process(task_to_wake); | 632 | wake_up_process(task_to_wake); |
633 | } else if ((is_valid_oplock_break(smb_buffer) == FALSE) | 633 | } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE) |
634 | && (isMultiRsp == FALSE)) { | 634 | && (isMultiRsp == FALSE)) { |
635 | cERROR(1, ("No task to wake, unknown frame rcvd!")); | 635 | cERROR(1, ("No task to wake, unknown frame rcvd!")); |
636 | cifs_dump_mem("Received Data is: ",(char *)smb_buffer, | 636 | cifs_dump_mem("Received Data is: ",(char *)smb_buffer, |
@@ -1785,11 +1785,20 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1785 | } else if(volume_info.wsize) | 1785 | } else if(volume_info.wsize) |
1786 | cifs_sb->wsize = volume_info.wsize; | 1786 | cifs_sb->wsize = volume_info.wsize; |
1787 | else | 1787 | else |
1788 | cifs_sb->wsize = CIFSMaxBufSize; /* default */ | 1788 | cifs_sb->wsize = |
1789 | if(cifs_sb->rsize < PAGE_CACHE_SIZE) { | 1789 | min_t(const int, PAGEVEC_SIZE * PAGE_CACHE_SIZE, |
1790 | cifs_sb->rsize = PAGE_CACHE_SIZE; | 1790 | 127*1024); |
1791 | /* Windows ME does this */ | 1791 | /* old default of CIFSMaxBufSize was too small now |
1792 | cFYI(1,("Attempt to set readsize for mount to less than one page (4096)")); | 1792 | that SMB Write2 can send multiple pages in kvec. |
1793 | RFC1001 does not describe what happens when frame | ||
1794 | bigger than 128K is sent so use that as max in | ||
1795 | conjunction with 52K kvec constraint on arch with 4K | ||
1796 | page size */ | ||
1797 | |||
1798 | if(cifs_sb->rsize < 2048) { | ||
1799 | cifs_sb->rsize = 2048; | ||
1800 | /* Windows ME may prefer this */ | ||
1801 | cFYI(1,("readsize set to minimum 2048")); | ||
1793 | } | 1802 | } |
1794 | cifs_sb->mnt_uid = volume_info.linux_uid; | 1803 | cifs_sb->mnt_uid = volume_info.linux_uid; |
1795 | cifs_sb->mnt_gid = volume_info.linux_gid; | 1804 | cifs_sb->mnt_gid = volume_info.linux_gid; |