From: "Dave Young" <hidave.darkstar@gmail.com>
To: "Al Viro" <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, jens.axboe@oracle.com
Subject: Re: [PATCH 2/2] loop : Don't hold the lo_ctl_mutex while fput in loop_clr_fd
Date: Mon, 28 Apr 2008 10:33:14 +0800 [thread overview]
Message-ID: <a8e1da0804271933i528d7c98m526195b361119dcf@mail.gmail.com> (raw)
In-Reply-To: <20080428021531.GA5882@ZenIV.linux.org.uk>
On Mon, Apr 28, 2008 at 10:15 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Mon, Apr 28, 2008 at 03:13:09AM +0100, Al Viro wrote:
> > On Mon, Apr 28, 2008 at 10:10:22AM +0800, Dave Young wrote:
> > > [Fixing bug 10504]
> > >
> > > If the bakingfile is a block device file, losetuo -d will trigger lockdep
> > > warning of "circular locking dependency".
> > >
> > > open/release lock order : bdev->bd_mutex ---> lo->lo_ctl_mutex
> > > loop_clr_fd lock order : lo->lo_ctl_mutex ---> bdev->bd_mutex (fput)
> > >
> > > Don't hold the lo_ctl_mutex while fput in loop_clr_fd to fix it. It's safe
> > > because all loop device state will be consistent here.
> >
> > Explain.
Hi, Maybe I have some mis-understood, thanks for pointing out in advance.
IMO the lo_ctl_mutex is for the lo->* state locking, they are all set
to proper values before fput(filp), so I think it's safe to do that.
>
> BTW, explain also why open() at that spot will not do interesting things
> wrt BLKRRPART done a bit below, please.
>
open with a loop device unbound? Sorry, I don't understand. Could you
explain a bit? Thanks
Regards
dave
next prev parent reply other threads:[~2008-04-28 2:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 2:10 Dave Young
2008-04-28 2:13 ` Al Viro
2008-04-28 2:15 ` Al Viro
2008-04-28 2:33 ` Dave Young [this message]
2009-03-01 9:47 ` Jiri Slaby
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=a8e1da0804271933i528d7c98m526195b361119dcf@mail.gmail.com \
--to=hidave.darkstar@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--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
Powered by JetHome