The patch titled ext4: improve some code in rb tree part of dir.c has been added to the -mm tree. Its filename is ext4-improve-some-code-in-rb-tree-part-of-dirc.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: ext4: improve some code in rb tree part of dir.c From: Shen Feng <shen@xxxxxxxxxxxxxx> *remove unnecessary code in free_rb_tree_fname *rename free_rb_tree_fname to ext4_htree_create_dir_info since it and ext4_htree_free_dir_info are a pair *replace kmalloc with kzalloc in ext4_htree_free_dir_info Signed-off-by: Shen Feng <shen@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ext4/dir.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff -puN fs/ext4/dir.c~ext4-improve-some-code-in-rb-tree-part-of-dirc fs/ext4/dir.c --- a/fs/ext4/dir.c~ext4-improve-some-code-in-rb-tree-part-of-dirc +++ a/fs/ext4/dir.c @@ -272,7 +272,7 @@ static void free_rb_tree_fname(struct rb 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 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 * 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; _ Patches currently in -mm which might be from shen@xxxxxxxxxxxxxx are ext4-error-proc-entry-creation-when-the-fs-ext4-is-not-correctly-created.patch ext4-improve-some-code-in-rb-tree-part-of-dirc.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html