diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index a028ee740e..5db54de4c7 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -23,7 +23,11 @@ #include "osi_compat.h" #ifndef CURRENT_TIME -#define CURRENT_TIME (current_kernel_time()) +# ifdef IATTR_TAKES_64BIT_TIME +# define CURRENT_TIME (current_kernel_time64()) +# else +# define CURRENT_TIME (current_kernel_time()) +# endif #endif int cache_fh_type = -1; diff --git a/src/cf/linux-kernel-assorted.m4 b/src/cf/linux-kernel-assorted.m4 index 990b2a2e71..40210332c2 100644 --- a/src/cf/linux-kernel-assorted.m4 +++ b/src/cf/linux-kernel-assorted.m4 @@ -9,6 +9,7 @@ LINUX_KMEM_CACHE_CREATE_CTOR_TAKES_VOID LINUX_D_PATH_TAKES_STRUCT_PATH LINUX_NEW_EXPORT_OPS LINUX_INODE_SETATTR_RETURN_TYPE +LINUX_IATTR_64BIT_TIME LINUX_IOP_I_CREATE_TAKES_NAMEIDATA LINUX_IOP_I_LOOKUP_TAKES_NAMEIDATA LINUX_IOP_I_PERMISSION_TAKES_FLAGS diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 5a53f98189..8667b4f3e9 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -197,7 +197,17 @@ AC_DEFUN([LINUX_INODE_SETATTR_RETURN_TYPE], [ []) ]) - +AC_DEFUN([LINUX_IATTR_64BIT_TIME], [ + AC_CHECK_LINUX_BUILD([whether struct iattr->ia_ctime takes struct timespec64 or 32-bit struct timespec], + [ac_cv_linux_func_iattr_ctime_takes_timespec64], + [#include + #include ], + [struct iattr _attrs; + _attrs.ia_ctime = current_kernel_time64();], + [IATTR_TAKES_64BIT_TIME], + [define if struct iattr->ia_ctime takes struct timespec64], + []) +]) AC_DEFUN([LINUX_AOP_WRITEBACK_CONTROL], [ AC_CHECK_LINUX_BUILD([whether aop.writepage takes a writeback_control],