lkml.org 
[lkml]   [2010]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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



    \
     
     \ /
      Last update: 2010-12-24 12:13    [W:0.022 / U:30.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site