mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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>
This commit is contained in:
parent
942835d68f
commit
2f713b5c7d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user