From: Jules Irenge <jbi.octave@gmail.com>
To: boqun.feng@gmail.com
Cc: dan.j.williams@intel.com, vishal.l.verma@intel.co,
dave.jiang@intel.com, linux-nvdimm@lists.01.org,
linux-kernel@vger.kernel.org, yi.zhang@redhat.com,
Jules Irenge <jbi.octave@gmail.com>
Subject: [PATCH v2] dax: Add missing annotations for dax_read_lock() and dax_read_unlock()
Date: Mon, 24 Feb 2020 01:50:49 +0000 [thread overview]
Message-ID: <20200224015049.57556-1-jbi.octave@gmail.com> (raw)
Sparse reports warnings at dax_read_lock() and dax_read_unlock()
warning: context imbalance in dax_read_lock() - wrong count at exit
warning: context imbalance in dax_read_unlock() - unexpected unlock
The root cause is the missing annotations at dax_read_lock()
and dax_read_unlock()
Add the missing __acquires(&dax_srcu) annotation to dax_read_lock()
Add the missing __releases(&dax_srcu) annotation to dax_read_unlock()
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
Changes since V1
Correct commit log typing mistakes
drivers/dax/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 26a654dbc69a..f872a2fb98d4 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -28,13 +28,13 @@ static struct super_block *dax_superblock __read_mostly;
static struct hlist_head dax_host_list[DAX_HASH_SIZE];
static DEFINE_SPINLOCK(dax_host_lock);
-int dax_read_lock(void)
+int dax_read_lock(void) __acquires(&dax_srcu)
{
return srcu_read_lock(&dax_srcu);
}
EXPORT_SYMBOL_GPL(dax_read_lock);
-void dax_read_unlock(int id)
+void dax_read_unlock(int id) __releases(&dax_srcu)
{
srcu_read_unlock(&dax_srcu, id);
}
--
2.24.1
reply other threads:[~2020-02-24 1:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200224015049.57556-1-jbi.octave@gmail.com \
--to=jbi.octave@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=vishal.l.verma@intel.co \
--cc=yi.zhang@redhat.com \
/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