Re: [PATCH] ext2_readdir() filp->f_pos fix
From: Andrew Morton
Date: Thu Jul 29 2004 - 17:55:03 EST
Jan Blunck <j.blunck@xxxxxxxxxxxxx> wrote:
>
> If the whole inode is read, ext2_readdir() sets the f_pos to a multiple
^^ directory
> of the page size (because of the conditions of the outer for loop). This
> sets the wrong f_pos for directory inodes on ext2 partitions with a
> block size differing from the page size.
Interesting. How did you actually notice this? Is the same problem not present
in 2.4?
If the IS_ERR(page) returns true, should we not advance f_pos to skip this
page?
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.
-
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/