[PATCH 26/30] zram: Add missing annotatin for zram_slot_unlock()

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

 



Sparse reports a warning at zram_slot_unlock()
warning: context imbalance in zram_slot_unlock() - unexpected unlock
The root cause is the missing annotation at zram_slot_unlock()
Add the missing  __releases(ZRAM_LOCK) annotation

Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
 drivers/block/zram/zram_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 1462b1bfec11..a38725452966 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -68,6 +68,7 @@ static void zram_slot_lock(struct zram *zram, u32 index)
 }
 
 static void zram_slot_unlock(struct zram *zram, u32 index)
+	__releases(ZRAM_LOCK)
 {
 	bit_spin_unlock(ZRAM_LOCK, &zram->table[index].flags);
 }
-- 
2.24.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux