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

Commit 31be83ae authored by Al Viro's avatar Al Viro Committed by Bob Copeland
Browse files

omfs: make readdir stop when filldir says so



filldir returning an error does *not* mean "skip this entry, try the
next one"...

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
parent d932805b
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -361,9 +361,10 @@ static int omfs_fill_chain(struct file *filp, void *dirent, filldir_t filldir,


		res = filldir(dirent, oi->i_name, strnlen(oi->i_name,
		res = filldir(dirent, oi->i_name, strnlen(oi->i_name,
			OMFS_NAMELEN), filp->f_pos, self, d_type);
			OMFS_NAMELEN), filp->f_pos, self, d_type);
		if (res == 0)
			filp->f_pos++;
		brelse(bh);
		brelse(bh);
		if (res < 0)
			break;
		filp->f_pos++;
	}
	}
out:
out:
	return res;
	return res;