diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 9eb327defa1d..197ac579a70b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2914,11 +2914,11 @@ remote_path_check: | |||
2914 | 2914 | ||
2915 | spin_lock(&cifs_sb->tlink_tree_lock); | 2915 | spin_lock(&cifs_sb->tlink_tree_lock); |
2916 | radix_tree_insert(&cifs_sb->tlink_tree, pSesInfo->linux_uid, tlink); | 2916 | radix_tree_insert(&cifs_sb->tlink_tree, pSesInfo->linux_uid, tlink); |
2917 | radix_tree_tag_set(&cifs_sb->tlink_tree, pSesInfo->linux_uid, | ||
2918 | CIFS_TLINK_MASTER_TAG); | ||
2919 | spin_unlock(&cifs_sb->tlink_tree_lock); | 2917 | spin_unlock(&cifs_sb->tlink_tree_lock); |
2920 | radix_tree_preload_end(); | 2918 | radix_tree_preload_end(); |
2921 | 2919 | ||
2920 | cifs_sb->master_tlink = tlink; | ||
2921 | |||
2922 | queue_delayed_work(system_nrt_wq, &cifs_sb->prune_tlinks, | 2922 | queue_delayed_work(system_nrt_wq, &cifs_sb->prune_tlinks, |
2923 | TLINK_IDLE_EXPIRE); | 2923 | TLINK_IDLE_EXPIRE); |
2924 | 2924 | ||
@@ -3271,22 +3271,10 @@ out: | |||
3271 | return tcon; | 3271 | return tcon; |
3272 | } | 3272 | } |
3273 | 3273 | ||
3274 | static struct tcon_link * | 3274 | static inline struct tcon_link * |
3275 | cifs_sb_master_tlink(struct cifs_sb_info *cifs_sb) | 3275 | cifs_sb_master_tlink(struct cifs_sb_info *cifs_sb) |
3276 | { | 3276 | { |
3277 | struct tcon_link *tlink; | 3277 | return cifs_sb->master_tlink; |
3278 | unsigned int ret; | ||
3279 | |||
3280 | spin_lock(&cifs_sb->tlink_tree_lock); | ||
3281 | ret = radix_tree_gang_lookup_tag(&cifs_sb->tlink_tree, (void **)&tlink, | ||
3282 | 0, 1, CIFS_TLINK_MASTER_TAG); | ||
3283 | spin_unlock(&cifs_sb->tlink_tree_lock); | ||
3284 | |||
3285 | /* the master tcon should always be present */ | ||
3286 | if (ret == 0) | ||
3287 | BUG(); | ||
3288 | |||
3289 | return tlink; | ||
3290 | } | 3278 | } |
3291 | 3279 | ||
3292 | struct cifsTconInfo * | 3280 | struct cifsTconInfo * |