-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux 5.16 compat: Added add_disk check for return
add_disk went from void to must-check int return. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Coleman Kane <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #12975 (cherry picked from commit 12fa250) Signed-off-by: Jonathon Fernyhough <[email protected]>
- Loading branch information
1 parent
6bee1d6
commit 17b1cac
Showing
3 changed files
with
33 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
dnl # | ||
dnl # 5.16 API change | ||
dnl # add_disk grew a must-check return code | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ADD_DISK], [ | ||
ZFS_LINUX_TEST_SRC([add_disk_ret], [ | ||
#include <linux/genhd.h> | ||
], [ | ||
struct gendisk *disk = NULL; | ||
int err = add_disk(disk); | ||
err = err; | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_ADD_DISK], [ | ||
AC_MSG_CHECKING([whether add_disk() returns int]) | ||
ZFS_LINUX_TEST_RESULT([add_disk_ret], | ||
[ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_ADD_DISK_RET, 1, | ||
[add_disk() returns int]) | ||
], [ | ||
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