diff options
-rw-r--r-- | fs/cifs/cifs_fs_sb.h | 1 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 7 | ||||
-rw-r--r-- | fs/cifs/connect.c | 10 |
3 files changed, 6 insertions, 12 deletions
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h index 07ed81cf1552..cbd216b57239 100644 --- a/fs/cifs/cifs_fs_sb.h +++ b/fs/cifs/cifs_fs_sb.h | |||
@@ -68,7 +68,6 @@ struct cifs_sb_info { | |||
68 | umode_t mnt_dir_mode; | 68 | umode_t mnt_dir_mode; |
69 | unsigned int mnt_cifs_flags; | 69 | unsigned int mnt_cifs_flags; |
70 | char *mountdata; /* options received at mount time or via DFS refs */ | 70 | char *mountdata; /* options received at mount time or via DFS refs */ |
71 | struct backing_dev_info bdi; | ||
72 | struct delayed_work prune_tlinks; | 71 | struct delayed_work prune_tlinks; |
73 | struct rcu_head rcu; | 72 | struct rcu_head rcu; |
74 | char *prepath; | 73 | char *prepath; |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 15e1db8738ae..502eab6bdbc4 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -138,7 +138,12 @@ cifs_read_super(struct super_block *sb) | |||
138 | sb->s_magic = CIFS_MAGIC_NUMBER; | 138 | sb->s_magic = CIFS_MAGIC_NUMBER; |
139 | sb->s_op = &cifs_super_ops; | 139 | sb->s_op = &cifs_super_ops; |
140 | sb->s_xattr = cifs_xattr_handlers; | 140 | sb->s_xattr = cifs_xattr_handlers; |
141 | sb->s_bdi = &cifs_sb->bdi; | 141 | rc = super_setup_bdi(sb); |
142 | if (rc) | ||
143 | goto out_no_root; | ||
144 | /* tune readahead according to rsize */ | ||
145 | sb->s_bdi->ra_pages = cifs_sb->rsize / PAGE_SIZE; | ||
146 | |||
142 | sb->s_blocksize = CIFS_MAX_MSGSIZE; | 147 | sb->s_blocksize = CIFS_MAX_MSGSIZE; |
143 | sb->s_blocksize_bits = 14; /* default 2**14 = CIFS_MAX_MSGSIZE */ | 148 | sb->s_blocksize_bits = 14; /* default 2**14 = CIFS_MAX_MSGSIZE */ |
144 | inode = cifs_root_iget(sb); | 149 | inode = cifs_root_iget(sb); |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 9ae695ae3ed7..7f50c8949401 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -3683,10 +3683,6 @@ cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info) | |||
3683 | int referral_walks_count = 0; | 3683 | int referral_walks_count = 0; |
3684 | #endif | 3684 | #endif |
3685 | 3685 | ||
3686 | rc = bdi_setup_and_register(&cifs_sb->bdi, "cifs"); | ||
3687 | if (rc) | ||
3688 | return rc; | ||
3689 | |||
3690 | #ifdef CONFIG_CIFS_DFS_UPCALL | 3686 | #ifdef CONFIG_CIFS_DFS_UPCALL |
3691 | try_mount_again: | 3687 | try_mount_again: |
3692 | /* cleanup activities if we're chasing a referral */ | 3688 | /* cleanup activities if we're chasing a referral */ |
@@ -3714,7 +3710,6 @@ try_mount_again: | |||
3714 | server = cifs_get_tcp_session(volume_info); | 3710 | server = cifs_get_tcp_session(volume_info); |
3715 | if (IS_ERR(server)) { | 3711 | if (IS_ERR(server)) { |
3716 | rc = PTR_ERR(server); | 3712 | rc = PTR_ERR(server); |
3717 | bdi_destroy(&cifs_sb->bdi); | ||
3718 | goto out; | 3713 | goto out; |
3719 | } | 3714 | } |
3720 | if ((volume_info->max_credits < 20) || | 3715 | if ((volume_info->max_credits < 20) || |
@@ -3768,9 +3763,6 @@ try_mount_again: | |||
3768 | cifs_sb->wsize = server->ops->negotiate_wsize(tcon, volume_info); | 3763 | cifs_sb->wsize = server->ops->negotiate_wsize(tcon, volume_info); |
3769 | cifs_sb->rsize = server->ops->negotiate_rsize(tcon, volume_info); | 3764 | cifs_sb->rsize = server->ops->negotiate_rsize(tcon, volume_info); |
3770 | 3765 | ||
3771 | /* tune readahead according to rsize */ | ||
3772 | cifs_sb->bdi.ra_pages = cifs_sb->rsize / PAGE_SIZE; | ||
3773 | |||
3774 | remote_path_check: | 3766 | remote_path_check: |
3775 | #ifdef CONFIG_CIFS_DFS_UPCALL | 3767 | #ifdef CONFIG_CIFS_DFS_UPCALL |
3776 | /* | 3768 | /* |
@@ -3887,7 +3879,6 @@ mount_fail_check: | |||
3887 | cifs_put_smb_ses(ses); | 3879 | cifs_put_smb_ses(ses); |
3888 | else | 3880 | else |
3889 | cifs_put_tcp_session(server, 0); | 3881 | cifs_put_tcp_session(server, 0); |
3890 | bdi_destroy(&cifs_sb->bdi); | ||
3891 | } | 3882 | } |
3892 | 3883 | ||
3893 | out: | 3884 | out: |
@@ -4090,7 +4081,6 @@ cifs_umount(struct cifs_sb_info *cifs_sb) | |||
4090 | } | 4081 | } |
4091 | spin_unlock(&cifs_sb->tlink_tree_lock); | 4082 | spin_unlock(&cifs_sb->tlink_tree_lock); |
4092 | 4083 | ||
4093 | bdi_destroy(&cifs_sb->bdi); | ||
4094 | kfree(cifs_sb->mountdata); | 4084 | kfree(cifs_sb->mountdata); |
4095 | kfree(cifs_sb->prepath); | 4085 | kfree(cifs_sb->prepath); |
4096 | call_rcu(&cifs_sb->rcu, delayed_free); | 4086 | call_rcu(&cifs_sb->rcu, delayed_free); |