diff options
author | Martin Brandenburg <martin@omnibond.com> | 2017-05-04 19:16:04 +0200 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2017-05-04 20:38:24 +0200 |
commit | 2f713b5c7d2a90baba6c88174c81fb9a96bfde21 (patch) | |
tree | f478c82f55b45d134f25c7ea99ad5bb6d06d3620 /fs/orangefs/dir.c | |
parent | orangefs: invalidate stored directory on seek (diff) | |
download | linux-2f713b5c7d2a90baba6c88174c81fb9a96bfde21.tar.xz linux-2f713b5c7d2a90baba6c88174c81fb9a96bfde21.zip |
orangefs: count directory pieces correctly
A large directory full of differently sized file names triggered this.
Most directories, even very large directories with shorter names, would
be lucky enough to fit in one server response.
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to '')
-rw-r--r-- | fs/orangefs/dir.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index cac601498925..d327cbd17756 100644 --- a/fs/orangefs/dir.c +++ b/fs/orangefs/dir.c @@ -135,9 +135,12 @@ static int parse_readdir(struct orangefs_dir *od, count = 1; part = od->part; - while (part && part->next) { - part = part->next; + while (part) { count++; + if (part->next) + part = part->next; + else + break; } new = (void *)op->downcall.trailer_buf; |