]>
Commit | Line | Data |
---|---|---|
5547c2f1 BB |
1 | dnl # |
2 | dnl # 2.6.34 API change | |
a08ee875 | 3 | dnl # The bdi_setup_and_register() helper function is available and |
5547c2f1 BB |
4 | dnl # exported by the kernel. This is a trivial helper function but |
5 | dnl # using it significantly simplifies the code surrounding setting | |
6 | dnl # up and tearing down the bdi structure. | |
7 | dnl # | |
70574182 ED |
8 | AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER], |
9 | [AC_MSG_CHECKING([whether bdi_setup_and_register() is available]) | |
a08ee875 LG |
10 | tmp_flags="$EXTRA_KCFLAGS" |
11 | EXTRA_KCFLAGS="-Wno-unused-result" | |
70574182 ED |
12 | ZFS_LINUX_TRY_COMPILE_SYMBOL([ |
13 | #include <linux/backing-dev.h> | |
14 | ], [ | |
15 | bdi_setup_and_register(NULL, NULL, 0); | |
16 | ], [bdi_setup_and_register], [mm/backing-dev.c], [ | |
17 | AC_MSG_RESULT(yes) | |
18 | AC_DEFINE(HAVE_BDI_SETUP_AND_REGISTER, 1, | |
19 | [bdi_setup_and_register() is available]) | |
20 | ], [ | |
21 | AC_MSG_RESULT(no) | |
22 | ]) | |
a08ee875 | 23 | EXTRA_KCFLAGS="$tmp_flags" |
5547c2f1 | 24 | ]) |