From: Linus Torvalds <torvalds@linux-foundation.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
Al Viro <viro@ftp.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: Sparse fix for scsi_request_fn
Date: Mon, 22 Oct 2007 19:09:56 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0710221908130.30120@woody.linux-foundation.org> (raw)
In-Reply-To: <20071023014845.GN27248@parisc-linux.org>
On Mon, 22 Oct 2007, Matthew Wilcox wrote:
>
> Introduce new __holds() macro to tell sparse it's OK to drop and then
> reacquire a lock within a function. Use it in scsi_request_fn.
Umm. This is why we write things like
static void double_lock_balance(struct rq *this_rq, struct rq *busiest)
__releases(this_rq->lock)
__acquires(busiest->lock)
__acquires(this_rq->lock)
{
...
ie your "__holds()" is nothing new, and should be written as
a pair of __releases(x) and __acquires(x), which is more readable anyway
(since it actually says what the function does!)
Linus
next prev parent reply other threads:[~2007-10-23 2:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 1:48 Matthew Wilcox
2007-10-23 2:09 ` Linus Torvalds [this message]
2007-10-23 21:13 ` Matthew Wilcox
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=alpine.LFD.0.999.0710221908130.30120@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=James.Bottomley@steeleye.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=viro@ftp.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
all inboxes | Powered by JetHome®