[PATCH 5/7] dm vdo dedupe: silence sparse warnings about locking context imbalances

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mike Snitzer <snitzer@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Susan LeGendre-McGhee <slegendr@xxxxxxxxxx>
Signed-off-by: Matthew Sakai <msakai@xxxxxxxxxx>
---
 drivers/md/dm-vdo/dedupe.c | 2 ++
 1 file changed, 2 insertions(+)

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;
-- 
2.42.0





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux