summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2024-02-06 05:04:20 +0300
committerMike Snitzer <snitzer@kernel.org>2024-02-20 21:43:18 +0300
commitf46b1ab7e7e4dacd748ccb6e12a77a3fea229764 (patch)
tree414aa5384127aaae01eb4b6e30e17c1ccaf4aebe
parent872564c501b72ae0c84af51084753e8652e4a84b (diff)
downloadlinux-f46b1ab7e7e4dacd748ccb6e12a77a3fea229764.tar.xz
dm vdo dedupe: silence sparse warnings about locking context imbalances
Annotate both open_index() and close_index() with __must_hold(&zones->lock) to silence these sparse warnings: warning: context imbalance in 'close_index' - unexpected unlock warning: context imbalance in 'open_index' - unexpected unlock Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
-rw-r--r--drivers/md/dm-vdo/dedupe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-vdo/dedupe.c b/drivers/md/dm-vdo/dedupe.c
index 8533f1669a01..4b00135511dd 100644
--- a/drivers/md/dm-vdo/dedupe.c
+++ b/drivers/md/dm-vdo/dedupe.c
@@ -2092,6 +2092,7 @@ static void finish_uds_queue(void *ptr __always_unused)
}
static void close_index(struct hash_zones *zones)
+ __must_hold(&zones->lock)
{
int result;
@@ -2113,6 +2114,7 @@ static void close_index(struct hash_zones *zones)
}
static void open_index(struct hash_zones *zones)
+ __must_hold(&zones->lock)
{
/* ASSERTION: We enter in IS_CLOSED state. */
int result;