nbd: Improve the documentation of the locking assumptions
authorBart Van Assche <bvanassche@acm.org>
Fri, 10 May 2024 20:23:11 +0000 (13:23 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 14 May 2024 13:22:35 +0000 (07:22 -0600)
commit2a6751e052ab4789630bc889c814037068723bc1
treeb1f6e10a7b7ac650f41245225a68712039fa662e
parent40639e9a0f6e49edd4ef520e6c0e070e1a04a330
nbd: Improve the documentation of the locking assumptions

Document locking assumptions with lockdep_assert_held() instead of source
code comments. The advantage of lockdep_assert_held() is that it is
verified at runtime if lockdep is enabled in the kernel config.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Josef Bacik <jbacik@fb.com>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240510202313.25209-4-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c