From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: 3.1-rc10 oops in nameidata_to_filp Date: Wed, 30 Nov 2011 15:57:41 -0800 Message-ID: <20111130155741.c6b3378d.akpm@linux-foundation.org> References: <20111124145141.GB22640@quack.suse.cz> <20111124164406.22919.qmail@science.horizon.com> <20111124173829.GL2203@ZenIV.linux.org.uk> <20111124175002.GM2203@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: George Spelvin , jack@suse.cz, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Al Viro Return-path: In-Reply-To: <20111124175002.GM2203@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org (sorry for the delay) On Thu, 24 Nov 2011 17:50:03 +0000 Al Viro 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 > 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 > > 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