Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: add lockdep to queue_limits_commit_update()

queue_limits_commit_update() expects q->limits_lock to be held by
the caller (via queue_limits_start_update()).

The API pattern is:

lim = queue_limits_start_update(q); /* acquires lock */
/* modify lim */
queue_limits_commit_update(q, &lim); /* releases lock */

OR

queue_limits_commit_update_frozen(q, &lim);
lim = queue_limits_start_update(q); /* acquires lock */
queue_limits_commit_update(q, &lim); /* releases lock */

Add lockdep_assert_held() to report incorrect API usage.

Signed-off-by: Chaitanya Kulkarni <ckulkarnilinux@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Chaitanya Kulkarni and committed by
Jens Axboe
86afb1cd 1649714b

+2
+2
block/blk-settings.c
··· 546 546 { 547 547 int error; 548 548 549 + lockdep_assert_held(&q->limits_lock); 550 + 549 551 error = blk_validate_limits(lim); 550 552 if (error) 551 553 goto out_unlock;