mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
config: remove HAVE_MODE_LOOKUP_BDEV
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
committed by
Brian Behlendorf
parent
c57d268a78
commit
1cb46d9d1a
@@ -322,9 +322,6 @@ zfs_check_media_change(struct block_device *bdev)
|
||||
* The function was exported for use, prior to this it existed but the
|
||||
* symbol was not exported.
|
||||
*
|
||||
* 4.4.0-6.21 API change for Ubuntu
|
||||
* lookup_bdev() gained a second argument, FMODE_*, to check inode permissions.
|
||||
*
|
||||
* 5.11 API change
|
||||
* Changed to take a dev_t argument which is set on success and return a
|
||||
* non-zero error code on failure.
|
||||
@@ -342,15 +339,6 @@ vdev_lookup_bdev(const char *path, dev_t *dev)
|
||||
*dev = bdev->bd_dev;
|
||||
bdput(bdev);
|
||||
|
||||
return (0);
|
||||
#elif defined(HAVE_MODE_LOOKUP_BDEV)
|
||||
struct block_device *bdev = lookup_bdev(path, FMODE_READ);
|
||||
if (IS_ERR(bdev))
|
||||
return (PTR_ERR(bdev));
|
||||
|
||||
*dev = bdev->bd_dev;
|
||||
bdput(bdev);
|
||||
|
||||
return (0);
|
||||
#else
|
||||
#error "Unsupported kernel"
|
||||
|
||||
Reference in New Issue
Block a user