From 91537b673c0bd0c12ba7587be6c685fef90286c9 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Thu, 12 Feb 2009 14:11:25 -0500 Subject: [PATCH] --- yaml --- r: 131439 b: refs/heads/master c: e00f7308658622fbd483cb0d9fe41165bf9050d0 h: refs/heads/master i: 131437: 52b08acdcbc508fda71c274302dade92f387efed 131435: 56de6b190f6bd2d36a88943ec5834927c7772f28 131431: 3a86d2fc63c3b85606be6e4d320b3fa1cde1cedd 131423: 5114e0b42c31d3e6d5cc12dd90f38cb4026f5102 v: v3 --- [refs] | 2 +- trunk/fs/btrfs/ctree.c | 11 ++--------- trunk/fs/btrfs/ctree.h | 1 - trunk/fs/btrfs/inode-map.c | 1 - trunk/fs/btrfs/inode.c | 2 -- 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 55e60769bdbb..8623e4b383b7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7951f3cefbd711f4429a0cd014aa83a844c399a0 +refs/heads/master: e00f7308658622fbd483cb0d9fe41165bf9050d0 diff --git a/trunk/fs/btrfs/ctree.c b/trunk/fs/btrfs/ctree.c index 6674692f7023..c8f4c540cc2c 100644 --- a/trunk/fs/btrfs/ctree.c +++ b/trunk/fs/btrfs/ctree.c @@ -38,19 +38,12 @@ static int balance_node_right(struct btrfs_trans_handle *trans, static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level, int slot); -inline void btrfs_init_path(struct btrfs_path *p) -{ - memset(p, 0, sizeof(*p)); -} - struct btrfs_path *btrfs_alloc_path(void) { struct btrfs_path *path; - path = kmem_cache_alloc(btrfs_path_cachep, GFP_NOFS); - if (path) { - btrfs_init_path(path); + path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS); + if (path) path->reada = 1; - } return path; } diff --git a/trunk/fs/btrfs/ctree.h b/trunk/fs/btrfs/ctree.h index 531db112c8bd..3f7a8058df2b 100644 --- a/trunk/fs/btrfs/ctree.h +++ b/trunk/fs/btrfs/ctree.h @@ -1834,7 +1834,6 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans, void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p); struct btrfs_path *btrfs_alloc_path(void); void btrfs_free_path(struct btrfs_path *p); -void btrfs_init_path(struct btrfs_path *p); void btrfs_set_path_blocking(struct btrfs_path *p); void btrfs_clear_path_blocking(struct btrfs_path *p); void btrfs_unlock_up_safe(struct btrfs_path *p, int level); diff --git a/trunk/fs/btrfs/inode-map.c b/trunk/fs/btrfs/inode-map.c index 2aa79873eb46..cc7334d833c9 100644 --- a/trunk/fs/btrfs/inode-map.c +++ b/trunk/fs/btrfs/inode-map.c @@ -84,7 +84,6 @@ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans, search_key.type = 0; search_key.offset = 0; - btrfs_init_path(path); start_found = 0; ret = btrfs_search_slot(trans, root, &search_key, path, 0, 0); if (ret < 0) diff --git a/trunk/fs/btrfs/inode.c b/trunk/fs/btrfs/inode.c index 638bcb5e49f6..3cee77ae03c8 100644 --- a/trunk/fs/btrfs/inode.c +++ b/trunk/fs/btrfs/inode.c @@ -2531,8 +2531,6 @@ noinline int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, key.offset = (u64)-1; key.type = (u8)-1; - btrfs_init_path(path); - search_again: ret = btrfs_search_slot(trans, root, &key, path, -1, 1); if (ret < 0)