aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-06-17 09:20:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-06-24 18:39:42 -0400
commit2ced6f693581357b2a5bf8b031a702c624b12d0d (patch)
treeb689f09161fbaf870695f8dc3ded0b61b1c693ce
parent5d3bc605cafe3f367b1c43b673bf643245c81626 (diff)
cifs: initialize ->tlink_tree in cifs_setup_cifs_sb()
no need to wait until cifs_read_super() and we need it done by the time cifs_mount() will be called. Acked-by: Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/cifs/cifsfs.c3
-rw-r--r--fs/cifs/connect.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index ec19161dd278..61c7aa870f1c 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -113,9 +113,6 @@ cifs_read_super(struct super_block *sb, struct smb_vol *volume_info,
113 113
114 cifs_sb = CIFS_SB(sb); 114 cifs_sb = CIFS_SB(sb);
115 115
116 spin_lock_init(&cifs_sb->tlink_tree_lock);
117 cifs_sb->tlink_tree = RB_ROOT;
118
119 rc = cifs_mount(cifs_sb, volume_info); 116 rc = cifs_mount(cifs_sb, volume_info);
120 117
121 if (rc) { 118 if (rc) {
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 3011ac8c9249..9f09adf51edc 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2663,6 +2663,9 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
2663{ 2663{
2664 INIT_DELAYED_WORK(&cifs_sb->prune_tlinks, cifs_prune_tlinks); 2664 INIT_DELAYED_WORK(&cifs_sb->prune_tlinks, cifs_prune_tlinks);
2665 2665
2666 spin_lock_init(&cifs_sb->tlink_tree_lock);
2667 cifs_sb->tlink_tree = RB_ROOT;
2668
2666 if (pvolume_info->rsize > CIFSMaxBufSize) { 2669 if (pvolume_info->rsize > CIFSMaxBufSize) {
2667 cERROR(1, "rsize %d too large, using MaxBufSize", 2670 cERROR(1, "rsize %d too large, using MaxBufSize",
2668 pvolume_info->rsize); 2671 pvolume_info->rsize);