Re: [PATCH] ext2_readdir() filp->f_pos fix
From: viro
Date: Thu Jul 29 2004 - 19:07:39 EST
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/