From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] blkcg: change a spin_lock() to spin_lock_irq()
Date: Thu, 29 Mar 2012 21:51:19 +0300 [thread overview]
Message-ID: <20120329185119.GA21812@elgon.mountain> (raw)
Smatch complains that we re-enable IRQs twice. It looks like we forgot
to disable them here on the spin_trylock() failure path. This was added
in 9f13ef678e "blkcg: use double locking instead of RCU for blkg
synchronization".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 74a76a8..bf4b76e 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1598,7 +1598,7 @@ static int blkiocg_pre_destroy(struct cgroup *cgroup)
} else {
spin_unlock_irq(&blkcg->lock);
cpu_relax();
- spin_lock(&blkcg->lock);
+ spin_lock_irq(&blkcg->lock);
}
}
next reply other threads:[~2012-03-29 18:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 18:51 Dan Carpenter [this message]
2012-03-29 18:57 ` [patch] blkcg: change a spin_lock() to spin_lock_irq() Jens Axboe
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=20120329185119.GA21812@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=axboe@kernel.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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