Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109059
b: refs/heads/master
c: d015641
h: refs/heads/master
i:
  109057: afacd22
  109055: d9ee509
v: v3
  • Loading branch information
Theodore Ts'o committed Aug 20, 2008
1 parent 2f8d427 commit 1707a04
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd21322616c3af265d39bf15321d436e667a5dd1
refs/heads/master: d015641734cde55d2fce48a6db3983c8a029fe05
20 changes: 15 additions & 5 deletions trunk/fs/ext4/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static int call_filldir(struct file * filp, void * dirent,
get_dtype(sb, fname->file_type));
if (error) {
filp->f_pos = curr_pos;
info->extra_fname = fname->next;
info->extra_fname = fname;
return error;
}
fname = fname->next;
Expand Down Expand Up @@ -450,11 +450,21 @@ static int ext4_dx_readdir(struct file * filp,
* If there are any leftover names on the hash collision
* chain, return them first.
*/
if (info->extra_fname &&
call_filldir(filp, dirent, filldir, info->extra_fname))
goto finished;
if (info->extra_fname) {
if (call_filldir(filp, dirent, filldir, info->extra_fname))
goto finished;

if (!info->curr_node)
info->extra_fname = NULL;
info->curr_node = rb_next(info->curr_node);
if (!info->curr_node) {
if (info->next_hash == ~0) {
filp->f_pos = EXT4_HTREE_EOF;
goto finished;
}
info->curr_hash = info->next_hash;
info->curr_minor_hash = 0;
}
} else if (!info->curr_node)
info->curr_node = rb_first(&info->root);

while (1) {
Expand Down

0 comments on commit 1707a04

Please sign in to comment.