mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
block: replace fmode_t with a block-specific type for block open flags
The only overlap between the block open flags mapped into the fmode_t and other uses of fmode_t are FMODE_READ and FMODE_WRITE. Define a new blk_mode_t instead for use in blkdev_get_by_{dev,path}, ->open and ->ioctl and stop abusing fmode_t. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jack Wang <jinpu.wang@ionos.com> [rnbd] Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christian Brauner <brauner@kernel.org> Link: https://lore.kernel.org/r/20230608110258.189493-28-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
5e4ea83467
commit
05bdb99653
82 changed files with 334 additions and 315 deletions
|
@ -257,7 +257,7 @@ static int btrfs_init_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
bdev = blkdev_get_by_path(device_path, FMODE_WRITE,
|
||||
bdev = blkdev_get_by_path(device_path, BLK_OPEN_WRITE,
|
||||
fs_info->bdev_holder, NULL);
|
||||
if (IS_ERR(bdev)) {
|
||||
btrfs_err(fs_info, "target device %s is invalid!", device_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue