[PATCH v2 09/26] block/blk-zoned: Add lock context annotations

Bart Van Assche
2026-03-25T21:45:56Z

Add the lock context annotations required for Clang's thread-safety
analysis.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-zoned.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index e1a23c8b676d..df0800e69ad7 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -439,6 +439,7 @@ static int blkdev_truncate_zone_range(struct block_device *bdev,
*/
int blkdev_zone_mgmt_ioctl(struct block_device *bdev, blk_mode_t mode,
unsigned int cmd, unsigned long arg)
+ __cond_acquires(0, bdev->bd_mapping->host->i_rwsem)
{
void __user *argp = (void __user *)arg;
struct blk_zone_range zrange;