diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-08-09 14:22:41 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-08-09 14:22:41 -0600 |
commit | 61884de08f8368b9aa289ab8dc953e0ce4c755b1 (patch) | |
tree | c47922602bf794586a0a45d51e88a8010875cde4 /drivers/block | |
parent | 991f61fe7e1db3f74b72a3a5cbe6b012804eb0ee (diff) | |
download | linux-stable-61884de08f8368b9aa289ab8dc953e0ce4c755b1.tar.gz linux-stable-61884de08f8368b9aa289ab8dc953e0ce4c755b1.tar.bz2 linux-stable-61884de08f8368b9aa289ab8dc953e0ce4c755b1.zip |
null_blk: add lock drop/acquire annotation
sparse complains:
drivers/block/null_blk_main.c:816:24: sparse: context imbalance in 'null_insert_page' - unexpected unlock
Fix it by adding the necessary annotations to the function.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/null_blk_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index 86cafa6d3b41..6127e3ff7b4b 100644 --- a/drivers/block/null_blk_main.c +++ b/drivers/block/null_blk_main.c @@ -804,7 +804,9 @@ static struct nullb_page *null_lookup_page(struct nullb *nullb, } static struct nullb_page *null_insert_page(struct nullb *nullb, - sector_t sector, bool ignore_cache) + sector_t sector, bool ignore_cache) + __releases(&nullb->lock) + __acquires(&nullb->lock) { u64 idx; struct nullb_page *t_page; |