Fix lookup_bdev() on Ubuntu

Ubuntu added support for checking inode permissions to lookup_bdev() in kernel
commit 193fb6a2c94fab8eb8ce70a5da4d21c7d4023bee (merged in 4.4.0-6.21).
Upstream bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1636517

This patch adds a test for Ubuntu's variant of lookup_bdev() to configure and
calls the function in the correct way.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Hajo Möller <dasjoe@gmail.com>
Closes #5336
This commit is contained in:
Hajo Möller
2016-10-26 19:30:43 +02:00
committed by Brian Behlendorf
parent 76a87a902e
commit e02aaf17f1
3 changed files with 31 additions and 10 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ zvol_is_zvol(const char *device)
struct block_device *bdev;
unsigned int major;
bdev = lookup_bdev(device);
bdev = vdev_lookup_bdev(device);
if (IS_ERR(bdev))
return (B_FALSE);