]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-clear-inode.m4
Linux 3.5 compat, end_writeback() changed to clear_inode()
[mirror_zfs.git] / config / kernel-clear-inode.m4
CommitLineData
739a1a82
RY
1dnl #
2dnl # 3.5.0 API change
3dnl # torvalds/linux@dbd5768f87ff6fb0a4fe09c4d7b6c4a24de99430 and
4dnl # torvalds/linux@7994e6f7254354e03028a11f98a27bd67dace9f1 reworked
5dnl # where inode_sync_wait() is called.
6dnl #
7dnl # Prior to these changes it would occur in end_writeback() but due
8dnl # to various issues (described in the above commits) it has been
9dnl # moved to evict(). This changes the ordering is which sync occurs
10dnl # but otherwise doesn't impact the zpl implementation.
11dnl #
12dnl # The major impact here is the renaming of end_writeback() to
13dnl # clear_inode(). However, care must be taken when detecting this
14dnl # API change because as recently as 2.6.35 there was a clear_inode()
15dnl # function. However, it was made obsolete by the evict_inode() API
16dnl # change at the same time.
17dnl #
18dnl # Therefore, to ensure we have the correct API we only allow the
19dnl # clear_inode() compatibility code to be defined iff the evict_inode()
20dnl # functionality is also detected.
21dnl #
22AC_DEFUN([ZFS_AC_KERNEL_CLEAR_INODE], [
23 ZFS_CHECK_SYMBOL_EXPORT(
24 [clear_inode],
25 [fs/inode.c],
26 [AC_DEFINE(HAVE_CLEAR_INODE, 1,
27 [clear_inode() is available])],
28 [])
29])