aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-08-22 15:46:09 -0400
committerMark Fasheh <mfasheh@suse.com>2008-10-13 19:57:05 -0400
commit8d6220d6a74a33552cf877bcea25503d7f6a59e6 (patch)
tree2c3f662c55ab4a0a22989c06edf0d027387bfbed /fs/ocfs2/alloc.h
parent1625f8ac151743e452ec062c2989669c508ffa48 (diff)
ocfs2: Change ocfs2_get_*_extent_tree() to ocfs2_init_*_extent_tree()
The original get/put_extent_tree() functions held a reference on et_root_bh. However, every single caller already has a safe reference, making the get/put cycle irrelevant. We change ocfs2_get_*_extent_tree() to ocfs2_init_*_extent_tree(). It no longer gets a reference on et_root_bh. ocfs2_put_extent_tree() is removed. Callers now have a simpler init+use pattern. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/alloc.h')
-rw-r--r--fs/ocfs2/alloc.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/fs/ocfs2/alloc.h b/fs/ocfs2/alloc.h
index 35ad07f96104..70257c84cfbe 100644
--- a/fs/ocfs2/alloc.h
+++ b/fs/ocfs2/alloc.h
@@ -41,7 +41,7 @@
41 * 41 *
42 * ocfs2_extent_tree becomes the first-class object for extent tree 42 * ocfs2_extent_tree becomes the first-class object for extent tree
43 * manipulation. Callers of the alloc.c code need to fill it via one of 43 * manipulation. Callers of the alloc.c code need to fill it via one of
44 * the ocfs2_get_*_extent_tree() operations below. 44 * the ocfs2_init_*_extent_tree() operations below.
45 * 45 *
46 * ocfs2_extent_tree contains info for the root of the b-tree, it must have a 46 * ocfs2_extent_tree contains info for the root of the b-tree, it must have a
47 * root ocfs2_extent_list and a root_bh so that they can be used in the b-tree 47 * root ocfs2_extent_list and a root_bh so that they can be used in the b-tree
@@ -59,21 +59,19 @@ struct ocfs2_extent_tree {
59}; 59};
60 60
61/* 61/*
62 * ocfs2_*_get_extent_tree() will fill an ocfs2_extent_tree from the 62 * ocfs2_init_*_extent_tree() will fill an ocfs2_extent_tree from the
63 * specified object buffer. The bh is referenced until 63 * specified object buffer.
64 * ocfs2_put_extent_tree().
65 */ 64 */
66void ocfs2_get_dinode_extent_tree(struct ocfs2_extent_tree *et, 65void ocfs2_init_dinode_extent_tree(struct ocfs2_extent_tree *et,
67 struct inode *inode, 66 struct inode *inode,
68 struct buffer_head *bh); 67 struct buffer_head *bh);
69void ocfs2_get_xattr_tree_extent_tree(struct ocfs2_extent_tree *et, 68void ocfs2_init_xattr_tree_extent_tree(struct ocfs2_extent_tree *et,
70 struct inode *inode,
71 struct buffer_head *bh);
72void ocfs2_get_xattr_value_extent_tree(struct ocfs2_extent_tree *et,
73 struct inode *inode, 69 struct inode *inode,
74 struct buffer_head *bh, 70 struct buffer_head *bh);
75 struct ocfs2_xattr_value_root *xv); 71void ocfs2_init_xattr_value_extent_tree(struct ocfs2_extent_tree *et,
76void ocfs2_put_extent_tree(struct ocfs2_extent_tree *et); 72 struct inode *inode,
73 struct buffer_head *bh,
74 struct ocfs2_xattr_value_root *xv);
77 75
78struct ocfs2_alloc_context; 76struct ocfs2_alloc_context;
79int ocfs2_insert_extent(struct ocfs2_super *osb, 77int ocfs2_insert_extent(struct ocfs2_super *osb,