forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Hajo Möller <[email protected]> Closes openzfs#5336
- Loading branch information
1 parent
76a87a9
commit e02aaf1
Showing
3 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
dnl # | ||
dnl # 2.6.27 API change | ||
dnl # lookup_bdev() was exported. | ||
dnl # 2.6.27, lookup_bdev() was exported. | ||
dnl # 4.4.0-6.21 - x.y on Ubuntu, lookup_bdev() takes 2 arguments. | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_LOOKUP_BDEV], | ||
[AC_MSG_CHECKING([whether lookup_bdev() is available]) | ||
[AC_MSG_CHECKING([whether lookup_bdev() wants 1 arg]) | ||
ZFS_LINUX_TRY_COMPILE_SYMBOL([ | ||
#include <linux/fs.h> | ||
], [ | ||
lookup_bdev(NULL); | ||
], [lookup_bdev], [fs/block_dev.c], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_LOOKUP_BDEV, 1, [lookup_bdev() is available]) | ||
AC_DEFINE(HAVE_1ARG_LOOKUP_BDEV, 1, [lookup_bdev() wants 1 arg]) | ||
], [ | ||
AC_MSG_RESULT(no) | ||
AC_MSG_CHECKING([whether lookup_bdev() wants 2 args]) | ||
ZFS_LINUX_TRY_COMPILE_SYMBOL([ | ||
#include <linux/fs.h> | ||
], [ | ||
lookup_bdev(NULL, FMODE_READ); | ||
], [lookup_bdev], [fs/block_dev.c], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_2ARGS_LOOKUP_BDEV, 1, | ||
[lookup_bdev() wants 2 args]) | ||
], [ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters