From 415810868c84c5ff9e5df21c241af8ad6d5dee30 Mon Sep 17 00:00:00 2001 From: Shen Feng Date: Fri, 11 Jul 2008 19:27:31 -0400 Subject: [PATCH] --- yaml --- r: 101073 b: refs/heads/master c: 69baee062a044ef1588e423e52131710e7584d1a h: refs/heads/master i: 101071: 7fcea629fe792f211d129972259d775d5ff5e9d1 v: v3 --- [refs] | 2 +- trunk/fs/ext4/dir.c | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 2c3e21b88ae0..7aab8e14771e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 91d99827791fdd5f9424458ad5ae870f89dbcadf +refs/heads/master: 69baee062a044ef1588e423e52131710e7584d1a diff --git a/trunk/fs/ext4/dir.c b/trunk/fs/ext4/dir.c index 2bf0331ea194..5ed5108766c1 100644 --- a/trunk/fs/ext4/dir.c +++ b/trunk/fs/ext4/dir.c @@ -272,7 +272,7 @@ static void free_rb_tree_fname(struct rb_root *root) while (n) { /* Do the node's children first */ - if ((n)->rb_left) { + if (n->rb_left) { n = n->rb_left; continue; } @@ -301,24 +301,18 @@ static void free_rb_tree_fname(struct rb_root *root) parent->rb_right = NULL; n = parent; } - root->rb_node = NULL; } -static struct dir_private_info *create_dir_info(loff_t pos) +static struct dir_private_info *ext4_htree_create_dir_info(loff_t pos) { struct dir_private_info *p; - p = kmalloc(sizeof(struct dir_private_info), GFP_KERNEL); + p = kzalloc(sizeof(struct dir_private_info), GFP_KERNEL); if (!p) return NULL; - p->root.rb_node = NULL; - p->curr_node = NULL; - p->extra_fname = NULL; - p->last_pos = 0; p->curr_hash = pos2maj_hash(pos); p->curr_minor_hash = pos2min_hash(pos); - p->next_hash = 0; return p; } @@ -433,7 +427,7 @@ static int ext4_dx_readdir(struct file * filp, int ret; if (!info) { - info = create_dir_info(filp->f_pos); + info = ext4_htree_create_dir_info(filp->f_pos); if (!info) return -ENOMEM; filp->private_data = info;