Wang Sheng-Hui
2012-Aug-14 04:54 UTC
[PATCH] btrfs-progs: remove redundant value set to path->reada in ctree.c/btrfs_alloc_path
btrfs_init_path has init the path to 0s. No need to set ->reada 0 after path init. Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> --- ctree.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ctree.c b/ctree.c index 2d86b1e..a04e0da 100644 --- a/ctree.c +++ b/ctree.c @@ -43,10 +43,9 @@ struct btrfs_path *btrfs_alloc_path(void) { struct btrfs_path *path; path = kmalloc(sizeof(struct btrfs_path), GFP_NOFS); - if (path) { + if (path) btrfs_init_path(path); - path->reada = 0; - } + return path; } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Wang Sheng-Hui
2012-Aug-14 04:57 UTC
[PATCH] btrfs-progs: remove redundant value set to path->reada in ctree.c/btrfs_alloc_path
btrfs_init_path has init the path to 0s. No need to set ->reada 0 after path init. Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> --- ctree.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ctree.c b/ctree.c index 2d86b1e..a04e0da 100644 --- a/ctree.c +++ b/ctree.c @@ -43,10 +43,9 @@ struct btrfs_path *btrfs_alloc_path(void) { struct btrfs_path *path; path = kmalloc(sizeof(struct btrfs_path), GFP_NOFS); - if (path) { + if (path) btrfs_init_path(path); - path->reada = 0; - } + return path; } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html