diff options
Diffstat (limited to 'fs/cifs/connect.c')
| -rw-r--r-- | fs/cifs/connect.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 88f60aa52058..e488603fb1e7 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
| @@ -1785,7 +1785,16 @@ 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 | min_t(const int, PAGEVEC_SIZE * PAGE_CACHE_SIZE, | ||
| 1790 | 127*1024); | ||
| 1791 | /* old default of CIFSMaxBufSize was too small now | ||
| 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 | |||
| 1789 | if(cifs_sb->rsize < PAGE_CACHE_SIZE) { | 1798 | if(cifs_sb->rsize < PAGE_CACHE_SIZE) { |
| 1790 | cifs_sb->rsize = PAGE_CACHE_SIZE; | 1799 | cifs_sb->rsize = PAGE_CACHE_SIZE; |
| 1791 | /* Windows ME does this */ | 1800 | /* Windows ME does this */ |
