Re: [PATCH] ext2_readdir() filp->f_pos fix

viro
2004-07-30T00:03:12Z

On Thu, Jul 29, 2004 at 03:46:25PM -0700, Andrew Morton wrote:
> If the filldir() call returns non-zero your patch will leave f_pos pointing at
> the problematic directory entry. I'm not sure whether this is desirable.
>
> hmm, ext2_readir() isn't propagating EFAULT back up to the caller.

filldir callback does that. Please, read through fs/readdir.c and take
a look at the way error value is generated.

Return value of filldir has only one meaning - should we stop or should
we go on. It's boolean, not an error value.

Errors are stored in data we are passing to filldir and picked by caller
of vfs_readdir() once it's done.