]) # LC_I_PAGES
#
+# LC_VM_FAULT_T
+#
+# kernel 4.17 commit 3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
+# mm: create the new vm_fault_t type
+#
+AC_DEFUN([LC_VM_FAULT_T], [
+LB_CHECK_COMPILE([if vm_fault_t type exists],
+vm_fault_t, [
+ #include <linux/mm_types.h>
+],[
+ vm_fault_t x = VM_FAULT_SIGBUS;
+ (void)x
+],[
+ AC_DEFINE(HAVE_VM_FAULT_T, 1,
+ [if vm_fault_t type exists])
+])
+]) # LC_VM_FAULT_T
+
+#
# LC_INODE_TIMESPEC64
#
# kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
LC_BI_BDEV
# 4.17
+ LC_VM_FAULT_T
LC_I_PAGES
# 4.18
* \retval VM_FAULT_ERROR on general error
* \retval NOPAGE_OOM not have memory for allocate new page
*/
-static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf)
+static vm_fault_t ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf)
{
struct lu_env *env;
struct cl_io *io;
}
#ifdef HAVE_VM_OPS_USE_VM_FAULT_ONLY
-static int ll_fault(struct vm_fault *vmf)
+static vm_fault_t ll_fault(struct vm_fault *vmf)
{
struct vm_area_struct *vma = vmf->vma;
#else
-static int ll_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+static vm_fault_t ll_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
#endif
int count = 0;
bool printed = false;
- int result;
+ vm_fault_t result;
sigset_t set;
/* Only SIGKILL and SIGTERM is allowed for fault/nopage/mkwrite
}
#ifdef HAVE_VM_OPS_USE_VM_FAULT_ONLY
-static int ll_page_mkwrite(struct vm_fault *vmf)
+static vm_fault_t ll_page_mkwrite(struct vm_fault *vmf)
{
struct vm_area_struct *vma = vmf->vma;
#else
-static int ll_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
+static vm_fault_t ll_page_mkwrite(struct vm_area_struct *vma,
+ struct vm_fault *vmf)
{
#endif
int count = 0;
bool printed = false;
bool retry;
- int result;
+ vm_fault_t result;
ll_stats_ops_tally(ll_i2sbi(file_inode(vma->vm_file)),
LPROC_LL_MKWRITE, 1);