linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: George Spelvin <linux@horizon.com>,
	jack@suse.cz, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: 3.1-rc10 oops in nameidata_to_filp
Date: Wed, 30 Nov 2011 15:57:41 -0800	[thread overview]
Message-ID: <20111130155741.c6b3378d.akpm@linux-foundation.org> (raw)
In-Reply-To: <20111124175002.GM2203@ZenIV.linux.org.uk>

(sorry for the delay)

On Thu, 24 Nov 2011 17:50:03 +0000
Al Viro <viro@ZenIV.linux.org.uk> wrote:

> On Thu, Nov 24, 2011 at 05:38:29PM +0000, Al Viro wrote:
> > Said that, I'm not buying the theory of open assigning to ->f_mapping and
> > screwing it up; all such assignments end up with ->i_mapping of *some*
> > inode, as far as I can see from cursory grep over the tree.  Just in case:
> > do you have CONFIG_FS_POSIX_ACL set?
> 
> BTW, why are we going through that dance with ->host->i_mapping anyway?
> It had been introduced by commit by akpm back in 2004 and from my reading
> of the commit message it was an overkill even back then.  Basically,
> that call got moved to the point past the call of ->open() (good, ->f_mapping
> could've been changed by it) *and* converted from ->f_mapping to
> ->f_mapping->host->i_mapping, which is useless.  Definitely so in the
> case mentioned in that commit (blkdev_open() sets ->f_mapping 
> bdev->bd_inode->i_mapping and that thing will have ->host pointing
> back to bdev->bd_inode).  Commit was in BK, its copy in historical tree
> is commit 1c211088833a27daa4512348bcae9890e8cf92d4
> Author: Andrew Morton <akpm@osdl.org>
> Date:   Wed May 26 17:35:42 2004 -0700
> 
>     [PATCH] Fix the setting of file->f_ra on block-special files
>     
>     We need to set file->f_ra _after_ calling blkdev_open(), when inode->i_mapping
>     points at the right thing.  And we need to get it from
>     inode->i_mapping->host->i_mapping too, which represents the underlying device.
>     
>     Also, don't test for null file->f_mapping in the O_DIRECT checks.
>     
>     Signed-off-by: Andrew Morton <akpm@osdl.org>
> 
> and the only difference wrt setting ->f_mapping on bdev open back then
> is that it used to be done in do_open() instead of blkdev_open() itself.
> So I don't understand what that part of changes had been for...  Andrew?

Beats me, sorry.  Here's the thread:
http://www.gossamer-threads.com/lists/linux/kernel/443511?do=post_view_flat#443511

  parent reply	other threads:[~2011-11-30 23:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 11:22 3.1-rc10 oops in nameidata_to_filp George Spelvin
2011-11-24 14:51 ` Jan Kara
2011-11-24 16:44   ` George Spelvin
2011-11-24 17:38     ` Al Viro
2011-11-24 17:50       ` Al Viro
2011-11-24 17:51         ` Al Viro
2011-11-30 23:57         ` Andrew Morton [this message]
2011-11-24 21:14       ` Jan Kara
2011-11-24 21:47       ` George Spelvin
2011-11-24 22:13         ` Al Viro

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=20111130155741.c6b3378d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).