Skip to content

Commit

Permalink
9p: fix a small bug in readdir for long directories
Browse files Browse the repository at this point in the history
Here is a proposed patch for bug in readdir. Listing of dirs with
many files fails without this patch.

Signed-off-by: Martin Stava <martin.stava@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
Martin Stava authored and Eric Van Hensbergen committed Nov 2, 2009
1 parent b6727b1 commit f91b909
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/9p/vfs_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
if (err <= 0)
break;

i = 0;
n = err;
while (i < n) {
err = p9stat_read(statbuf + i, buflen-i, &st,
Expand Down

0 comments on commit f91b909

Please sign in to comment.