lkml.org 
[lkml]   [2004]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ext2_readdir() filp->f_pos fix
Jan Blunck <j.blunck@tu-harburg.de> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans