Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221588
b: refs/heads/master
c: 413e661
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Nov 2, 2010
1 parent a845c7d commit 6ea8aeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df098db12ada832c0232ee1f91eff21a8701889c
refs/heads/master: 413e661c136c52290de1ee19a1b049a4da9dbf51
2 changes: 1 addition & 1 deletion trunk/fs/cifs/cifs_fs_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

struct cifs_sb_info {
struct radix_tree_root tlink_tree;
#define CIFS_TLINK_MASTER_TAG 0 /* is "master" (mount) tcon */
spinlock_t tlink_tree_lock;
struct tcon_link *master_tlink;
struct nls_table *local_nls;
unsigned int rsize;
unsigned int wsize;
Expand Down
20 changes: 4 additions & 16 deletions trunk/fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -2914,11 +2914,11 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,

spin_lock(&cifs_sb->tlink_tree_lock);
radix_tree_insert(&cifs_sb->tlink_tree, pSesInfo->linux_uid, tlink);
radix_tree_tag_set(&cifs_sb->tlink_tree, pSesInfo->linux_uid,
CIFS_TLINK_MASTER_TAG);
spin_unlock(&cifs_sb->tlink_tree_lock);
radix_tree_preload_end();

cifs_sb->master_tlink = tlink;

queue_delayed_work(system_nrt_wq, &cifs_sb->prune_tlinks,
TLINK_IDLE_EXPIRE);

Expand Down Expand Up @@ -3271,22 +3271,10 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid)
return tcon;
}

static struct tcon_link *
static inline struct tcon_link *
cifs_sb_master_tlink(struct cifs_sb_info *cifs_sb)
{
struct tcon_link *tlink;
unsigned int ret;

spin_lock(&cifs_sb->tlink_tree_lock);
ret = radix_tree_gang_lookup_tag(&cifs_sb->tlink_tree, (void **)&tlink,
0, 1, CIFS_TLINK_MASTER_TAG);
spin_unlock(&cifs_sb->tlink_tree_lock);

/* the master tcon should always be present */
if (ret == 0)
BUG();

return tlink;
return cifs_sb->master_tlink;
}

struct cifsTconInfo *
Expand Down

0 comments on commit 6ea8aeb

Please sign in to comment.