]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
block/bdev: Annotate the blk_holder_ops callback functions
authorBart Van Assche <bvanassche@acm.org>
Fri, 5 Jun 2026 18:00:55 +0000 (11:00 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jun 2026 19:41:11 +0000 (13:41 -0600)
The four callback functions in blk_holder_ops all release the
bd_holder_lock. Annotate these functions accordingly.

Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://patch.msgid.link/be51cf81110f691ebd5868ac2f15ceb847805bc8.1780682325.git.bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blkdev.h

index 65efbd7fe1a3875e5e68e3ef7a5ad973f2b5ca4c..57e84d59a642792e3397af3989e41fe035112b2b 100644 (file)
@@ -1746,22 +1746,26 @@ void blkdev_show(struct seq_file *seqf, off_t offset);
 #endif
 
 struct blk_holder_ops {
-       void (*mark_dead)(struct block_device *bdev, bool surprise);
+       void (*mark_dead)(struct block_device *bdev, bool surprise)
+               __releases(&bdev->bd_holder_lock);
 
        /*
         * Sync the file system mounted on the block device.
         */
-       void (*sync)(struct block_device *bdev);
+       void (*sync)(struct block_device *bdev)
+               __releases(&bdev->bd_holder_lock);
 
        /*
         * Freeze the file system mounted on the block device.
         */
-       int (*freeze)(struct block_device *bdev);
+       int (*freeze)(struct block_device *bdev)
+               __releases(&bdev->bd_holder_lock);
 
        /*
         * Thaw the file system mounted on the block device.
         */
-       int (*thaw)(struct block_device *bdev);
+       int (*thaw)(struct block_device *bdev)
+               __releases(&bdev->bd_holder_lock);
 };
 
 /*