From ee9f05f43f874238cc38cb357518f25119e77838 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Fri, 26 Apr 2013 16:06:10 -0500 Subject: Btrfs-progs: remove btrfs_init_path calls from ctree.c 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. [Eric Sandeen: port kernel commit e00f730 to userspace] (Note, the rest of userspace has an on-stack path, so the actual function remains for now). Signed-off-by: Chris Mason Signed-off-by: Eric Sandeen Signed-off-by: David Sterba Signed-off-by: Chris Mason --- ctree.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ctree.c') diff --git a/ctree.c b/ctree.c index 2495e0ec..eb69b57d 100644 --- a/ctree.c +++ b/ctree.c @@ -42,11 +42,7 @@ inline void btrfs_init_path(struct btrfs_path *p) struct btrfs_path *btrfs_alloc_path(void) { struct btrfs_path *path; - path = kmalloc(sizeof(struct btrfs_path), GFP_NOFS); - if (path) { - btrfs_init_path(path); - path->reada = 0; - } + path = kzalloc(sizeof(struct btrfs_path), GFP_NOFS); return path; } -- cgit v1.2.3