Skip to content

Commit 61884de

Browse files
committed
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>
1 parent 991f61f commit 61884de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/block/null_blk_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,9 @@ static struct nullb_page *null_lookup_page(struct nullb *nullb,
804804
}
805805

806806
static struct nullb_page *null_insert_page(struct nullb *nullb,
807-
sector_t sector, bool ignore_cache)
807+
sector_t sector, bool ignore_cache)
808+
__releases(&nullb->lock)
809+
__acquires(&nullb->lock)
808810
{
809811
u64 idx;
810812
struct nullb_page *t_page;

0 commit comments

Comments
 (0)