diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-10-28 15:16:44 (GMT) |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-11-02 19:20:23 (GMT) |
commit | b647c35f77af9c07d336247b23014596e9f0a593 (patch) | |
tree | 653949250681fd1c23ad529b631da793f95778a6 /fs/cifs/cifsfs.c | |
parent | 413e661c136c52290de1ee19a1b049a4da9dbf51 (diff) | |
download | linux-b647c35f77af9c07d336247b23014596e9f0a593.tar.xz |
cifs: convert tlink_tree to a rbtree
Radix trees are ideal when you want to track a bunch of pointers and
can't embed a tracking structure within the target of those pointers.
The tradeoff is an increase in memory, particularly if the tree is
sparse.
In CIFS, we use the tlink_tree to track tcon_link structs. A tcon_link
can never be in more than one tlink_tree, so there's no impediment to
using a rb_tree here instead of a radix tree.
Convert the new multiuser mount code to use a rb_tree instead. This
should reduce the memory required to manage the tlink_tree.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 75c4eaa..38526a6 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -116,7 +116,7 @@ cifs_read_super(struct super_block *sb, void *data, return -ENOMEM; spin_lock_init(&cifs_sb->tlink_tree_lock); - INIT_RADIX_TREE(&cifs_sb->tlink_tree, GFP_KERNEL); + cifs_sb->tlink_tree = RB_ROOT; rc = bdi_setup_and_register(&cifs_sb->bdi, "cifs", BDI_CAP_MAP_COPY); if (rc) { |