mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
block: introduce holder ops
Add a new blk_holder_ops structure, which is passed to blkdev_get_by_* and installed in the block_device for exclusive claims. It will be used to allow the block layer to call back into the user of the block device for thing like notification of a removed device or a device resize. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Link: https://lore.kernel.org/r/20230601094459.1350643-10-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
00080f7fb7
commit
0718afd47f
@@ -1786,7 +1786,7 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
|
||||
goto out2;
|
||||
|
||||
reg->hr_bdev = blkdev_get_by_dev(f.file->f_mapping->host->i_rdev,
|
||||
FMODE_WRITE | FMODE_READ, NULL);
|
||||
FMODE_WRITE | FMODE_READ, NULL, NULL);
|
||||
if (IS_ERR(reg->hr_bdev)) {
|
||||
ret = PTR_ERR(reg->hr_bdev);
|
||||
reg->hr_bdev = NULL;
|
||||
|
Reference in New Issue
Block a user