public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Jan Blunck <j.blunck@tu-harburg.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext2_readdir() filp->f_pos fix
Date: Thu, 29 Jul 2004 15:46:25 -0700	[thread overview]
Message-ID: <20040729154625.0a6f48a3.akpm@osdl.org> (raw)
In-Reply-To: <41094D69.9030008@tu-harburg.de>

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.

  reply	other threads:[~2004-07-29 22:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-29 19:18 [PATCH] ext2_readdir() filp->f_pos fix Jan Blunck
2004-07-29 22:46 ` Andrew Morton [this message]
2004-07-30  0:00   ` viro
2004-07-30 10:49   ` Jan Blunck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040729154625.0a6f48a3.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=j.blunck@tu-harburg.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox