summaryrefslogtreecommitdiffstats
path: root/config/kernel-truncate-range.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/kernel-truncate-range.m4')
-rw-r--r--config/kernel-truncate-range.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/config/kernel-truncate-range.m4 b/config/kernel-truncate-range.m4
new file mode 100644
index 000000000..4b1600b61
--- /dev/null
+++ b/config/kernel-truncate-range.m4
@@ -0,0 +1,19 @@
+dnl #
+dnl # 3.5 API change,
+dnl # inode_operations.truncate_range removed
+dnl #
+AC_DEFUN([SPL_AC_INODE_TRUNCATE_RANGE], [
+ AC_MSG_CHECKING([whether truncate_range() inode operation is available])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ struct inode_operations ops;
+ ops.truncate_range = NULL;
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INODE_TRUNCATE_RANGE, 1,
+ [truncate_range() inode operation is available])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])