Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f713b5c authored by Martin Brandenburg's avatar Martin Brandenburg Committed by Mike Marshall
Browse files

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: default avatarMartin Brandenburg <martin@omnibond.com>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 942835d6
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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;