Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213415
b: refs/heads/master
c: 9d002df
h: refs/heads/master
i:
  213413: 8bb7c59
  213411: dbacd09
  213407: 54ad648
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Oct 7, 2010
1 parent 1df1b65 commit e5b4169
Show file tree
Hide file tree
Showing 4 changed files with 280 additions and 29 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: c9928f7040a6e5f39e028bea500e0fde910d4a96
refs/heads/master: 9d002df492b14c690425d9785530371b6c1ccbca
7 changes: 5 additions & 2 deletions trunk/fs/cifs/cifs_fs_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* the GNU Lesser General Public License for more details.
*
*/
#include <linux/radix-tree.h>

#ifndef _CIFS_FS_SB_H
#define _CIFS_FS_SB_H

Expand All @@ -40,8 +42,9 @@
#define CIFS_MOUNT_MULTIUSER 0x20000 /* multiuser mount */

struct cifs_sb_info {
struct cifsTconInfo *ptcon; /* primary mount */
struct list_head nested_tcon_q;
struct radix_tree_root tlink_tree;
#define CIFS_TLINK_MASTER_TAG 0 /* is "master" (mount) tcon */
spinlock_t tlink_tree_lock;
struct nls_table *local_nls;
unsigned int rsize;
unsigned int wsize;
Expand Down
32 changes: 13 additions & 19 deletions trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,42 +317,36 @@ struct cifsTconInfo {
* "get" on the container.
*/
struct tcon_link {
spinlock_t tl_lock;
u32 tl_count;
u64 tl_time;
unsigned long tl_index;
unsigned long tl_flags;
#define TCON_LINK_MASTER 0
#define TCON_LINK_PENDING 1
#define TCON_LINK_IN_TREE 2
unsigned long tl_time;
atomic_t tl_count;
struct cifsTconInfo *tl_tcon;
};

static inline struct tcon_link *
cifs_sb_tlink(struct cifs_sb_info *cifs_sb)
{
return (struct tcon_link *)cifs_sb->ptcon;
}
extern struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb);

static inline struct cifsTconInfo *
tlink_tcon(struct tcon_link *tlink)
{
return (struct cifsTconInfo *)tlink;
return tlink->tl_tcon;
}

static inline void
cifs_put_tlink(struct tcon_link *tlink)
{
return;
}
extern void cifs_put_tlink(struct tcon_link *tlink);

static inline struct tcon_link *
cifs_get_tlink(struct tcon_link *tlink)
{
if (tlink && !IS_ERR(tlink))
atomic_inc(&tlink->tl_count);
return tlink;
}

/* This function is always expected to succeed */
static inline struct cifsTconInfo *
cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb)
{
return cifs_sb->ptcon;
}
extern struct cifsTconInfo *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb);

/*
* This info hangs off the cifsFileInfo structure, pointed to by llist.
Expand Down
Loading

0 comments on commit e5b4169

Please sign in to comment.