From: Martin Stava Date: Mon, 2 Nov 2009 14:39:35 +0000 (-0600) Subject: 9p: fix a small bug in readdir for long directories X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f91b90993f0d286be89f06c2f547ced8cfe291c6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 9p: fix a small bug in readdir for long directories Here is a proposed patch for bug in readdir. Listing of dirs with many files fails without this patch. Signed-off-by: Martin Stava Signed-off-by: Eric Van Hensbergen --- diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index 873cd31baa47..cae53d405f21 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -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,