[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101224110458.GA18894@maclin>
Date: Fri, 24 Dec 2010 14:04:58 +0300
From: Evgeniy Dushistov <dushistov@...l.ru>
To: Arnd Bergmann <arnd@...db.de>
Cc: Nick Bowler <nbowler@...iptictech.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/7] BKL removal follow-up
On Tue, Dec 21, 2010 at 11:54:06PM +0100, Arnd Bergmann wrote:
> On Monday 22 November 2010 16:17:23 Nick Bowler wrote:
> > On 2010-11-21 09:45 -0800, Linus Torvalds wrote:
> > > Yes, I'd be ok with UDF doing a "select BKL" along with a "default n"
> > > for BKL itself.
> > >
> > > I think UDF currently is the only sane reason to have BKL enabled any
> > > more, and yes, it would probably make it easier to configure things.
> >
> > UFS (which I use) also relies on BKL.
>
> Would you mind running a kernel with this patch and lockdep enabled then?
>
> It's quite likely that this doesn't work, but the easiest way to find
> out is to just try it if you don't understand the code. I can't see anything
> in the code that relies on the release-on-sleep semantics and there
> are no obvious recursive lock_kernel() calls.
>
I see one without looking at code (am I missed something?). See below.
> @@ -922,22 +922,22 @@ void ufs_evict_inode(struct inode * inode)
> if (want_delete) {
> loff_t old_i_size;
> /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/
> - lock_kernel();
> + lock_ufs();
lock
> mark_inode_dirty(inode);
> ufs_update_inode(inode, IS_SYNC(inode));
> old_i_size = inode->i_size;
> inode->i_size = 0;
> if (inode->i_blocks && ufs_truncate(inode, old_i_size))
call truncate with lock
> ufs_warning(inode->i_sb, __func__, "ufs_truncate failed\n");
> - unlock_kernel();
> + unlock_ufs();
> }
> diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c
> index a58f915..9f22d00 100644
> --- a/fs/ufs/truncate.c
> +++ b/fs/ufs/truncate.c
> @@ -467,7 +467,7 @@ int ufs_truncate(struct inode *inode, loff_t old_i_size)
>
> block_truncate_page(inode->i_mapping, inode->i_size, ufs_getfrag_block);
>
> - lock_kernel();
> + lock_ufs();
call lock again
--
/Evgeniy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists