diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-02-12 14:11:25 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-02-12 14:11:25 -0500 |
commit | e00f7308658622fbd483cb0d9fe41165bf9050d0 (patch) | |
tree | 5baeaee96a3d6789f4cce2ca17d7f4f8afb3431e /fs/btrfs/ctree.c | |
parent | 7951f3cefbd711f4429a0cd014aa83a844c399a0 (diff) |
Btrfs: remove btrfs_init_path
btrfs_init_path was initially used when the path objects were on the
stack. Now all the work is done by btrfs_alloc_path and btrfs_init_path
isn't required.
This patch removes it, and just uses kmem_cache_zalloc to zero out the object.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 6674692f7023..c8f4c540cc2c 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -38,19 +38,12 @@ static int balance_node_right(struct btrfs_trans_handle *trans, | |||
38 | static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root, | 38 | static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root, |
39 | struct btrfs_path *path, int level, int slot); | 39 | struct btrfs_path *path, int level, int slot); |
40 | 40 | ||
41 | inline void btrfs_init_path(struct btrfs_path *p) | ||
42 | { | ||
43 | memset(p, 0, sizeof(*p)); | ||
44 | } | ||
45 | |||
46 | struct btrfs_path *btrfs_alloc_path(void) | 41 | struct btrfs_path *btrfs_alloc_path(void) |
47 | { | 42 | { |
48 | struct btrfs_path *path; | 43 | struct btrfs_path *path; |
49 | path = kmem_cache_alloc(btrfs_path_cachep, GFP_NOFS); | 44 | path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS); |
50 | if (path) { | 45 | if (path) |
51 | btrfs_init_path(path); | ||
52 | path->reada = 1; | 46 | path->reada = 1; |
53 | } | ||
54 | return path; | 47 | return path; |
55 | } | 48 | } |
56 | 49 | ||