aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ext3/dir.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c
index 4c82531ea0a8..5853f4440af4 100644
--- a/fs/ext3/dir.c
+++ b/fs/ext3/dir.c
@@ -456,17 +456,8 @@ static int ext3_dx_readdir(struct file * filp,
456 if (info->extra_fname) { 456 if (info->extra_fname) {
457 if (call_filldir(filp, dirent, filldir, info->extra_fname)) 457 if (call_filldir(filp, dirent, filldir, info->extra_fname))
458 goto finished; 458 goto finished;
459
460 info->extra_fname = NULL; 459 info->extra_fname = NULL;
461 info->curr_node = rb_next(info->curr_node); 460 goto next_node;
462 if (!info->curr_node) {
463 if (info->next_hash == ~0) {
464 filp->f_pos = EXT3_HTREE_EOF;
465 goto finished;
466 }
467 info->curr_hash = info->next_hash;
468 info->curr_minor_hash = 0;
469 }
470 } else if (!info->curr_node) 461 } else if (!info->curr_node)
471 info->curr_node = rb_first(&info->root); 462 info->curr_node = rb_first(&info->root);
472 463
@@ -498,9 +489,14 @@ static int ext3_dx_readdir(struct file * filp,
498 info->curr_minor_hash = fname->minor_hash; 489 info->curr_minor_hash = fname->minor_hash;
499 if (call_filldir(filp, dirent, filldir, fname)) 490 if (call_filldir(filp, dirent, filldir, fname))
500 break; 491 break;
501 492 next_node:
502 info->curr_node = rb_next(info->curr_node); 493 info->curr_node = rb_next(info->curr_node);
503 if (!info->curr_node) { 494 if (info->curr_node) {
495 fname = rb_entry(info->curr_node, struct fname,
496 rb_hash);
497 info->curr_hash = fname->hash;
498 info->curr_minor_hash = fname->minor_hash;
499 } else {
504 if (info->next_hash == ~0) { 500 if (info->next_hash == ~0) {
505 filp->f_pos = EXT3_HTREE_EOF; 501 filp->f_pos = EXT3_HTREE_EOF;
506 break; 502 break;