aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/connect.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index f4d381e331ce..6ce888b04dc8 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3614,22 +3614,6 @@ cifs_get_volume_info(char *mount_data, const char *devname)
3614 return volume_info; 3614 return volume_info;
3615} 3615}
3616 3616
3617/* make sure ra_pages is a multiple of rsize */
3618static inline unsigned int
3619cifs_ra_pages(struct cifs_sb_info *cifs_sb)
3620{
3621 unsigned int reads;
3622 unsigned int rsize_pages = cifs_sb->rsize / PAGE_CACHE_SIZE;
3623
3624 if (rsize_pages >= default_backing_dev_info.ra_pages)
3625 return default_backing_dev_info.ra_pages;
3626 else if (rsize_pages == 0)
3627 return rsize_pages;
3628
3629 reads = default_backing_dev_info.ra_pages / rsize_pages;
3630 return reads * rsize_pages;
3631}
3632
3633int 3617int
3634cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info) 3618cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info)
3635{ 3619{
@@ -3717,7 +3701,7 @@ try_mount_again:
3717 cifs_sb->rsize = cifs_negotiate_rsize(tcon, volume_info); 3701 cifs_sb->rsize = cifs_negotiate_rsize(tcon, volume_info);
3718 3702
3719 /* tune readahead according to rsize */ 3703 /* tune readahead according to rsize */
3720 cifs_sb->bdi.ra_pages = cifs_ra_pages(cifs_sb); 3704 cifs_sb->bdi.ra_pages = cifs_sb->rsize / PAGE_CACHE_SIZE;
3721 3705
3722remote_path_check: 3706remote_path_check:
3723#ifdef CONFIG_CIFS_DFS_UPCALL 3707#ifdef CONFIG_CIFS_DFS_UPCALL