Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: Fix duplicate entries returned from getdents() system call
ext3: Fix duplicate entries returned from getdents() system call

+16 -24
+8 -12
fs/ext3/dir.c
··· 456 456 if (info->extra_fname) { 457 457 if (call_filldir(filp, dirent, filldir, info->extra_fname)) 458 458 goto finished; 459 - 460 459 info->extra_fname = NULL; 461 - info->curr_node = rb_next(info->curr_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 - } 460 + goto next_node; 470 461 } else if (!info->curr_node) 471 462 info->curr_node = rb_first(&info->root); 472 463 ··· 489 498 info->curr_minor_hash = fname->minor_hash; 490 499 if (call_filldir(filp, dirent, filldir, fname)) 491 500 break; 492 - 501 + next_node: 493 502 info->curr_node = rb_next(info->curr_node); 494 - if (!info->curr_node) { 503 + if (info->curr_node) { 504 + fname = rb_entry(info->curr_node, struct fname, 505 + rb_hash); 506 + info->curr_hash = fname->hash; 507 + info->curr_minor_hash = fname->minor_hash; 508 + } else { 495 509 if (info->next_hash == ~0) { 496 510 filp->f_pos = EXT3_HTREE_EOF; 497 511 break;
+8 -12
fs/ext4/dir.c
··· 459 459 if (info->extra_fname) { 460 460 if (call_filldir(filp, dirent, filldir, info->extra_fname)) 461 461 goto finished; 462 - 463 462 info->extra_fname = NULL; 464 - info->curr_node = rb_next(info->curr_node); 465 - if (!info->curr_node) { 466 - if (info->next_hash == ~0) { 467 - filp->f_pos = EXT4_HTREE_EOF; 468 - goto finished; 469 - } 470 - info->curr_hash = info->next_hash; 471 - info->curr_minor_hash = 0; 472 - } 463 + goto next_node; 473 464 } else if (!info->curr_node) 474 465 info->curr_node = rb_first(&info->root); 475 466 ··· 492 501 info->curr_minor_hash = fname->minor_hash; 493 502 if (call_filldir(filp, dirent, filldir, fname)) 494 503 break; 495 - 504 + next_node: 496 505 info->curr_node = rb_next(info->curr_node); 497 - if (!info->curr_node) { 506 + if (info->curr_node) { 507 + fname = rb_entry(info->curr_node, struct fname, 508 + rb_hash); 509 + info->curr_hash = fname->hash; 510 + info->curr_minor_hash = fname->minor_hash; 511 + } else { 498 512 if (info->next_hash == ~0) { 499 513 filp->f_pos = EXT4_HTREE_EOF; 500 514 break;