From a6df9fb5304da958936eed9095de6b78be9025e5 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Thu, 14 Dec 2017 19:54:57 -0600 Subject: [PATCH] Fix macro used to check kernel_read() argument order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The m4 macro implementing the configure check is called LINUX_KERNEL_READ_OFFSET_IS_LAST, but it defines a preprocessor symbol that is just KERNEL_READ_OFFSET_IS_LAST. Our code needs to check for the latter being defined, not the former. Reported by Aaron Ucko. Reviewed-on: https://gerrit.openafs.org/12808 Reviewed-by: Anders Kaseorg Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit edc5463f3db4b6af2307741d9f4ee8f2c81cd98e) Reviewed-on: https://gerrit.openafs.org/12809 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 383688fa0d6904291578eb1f9a7c2ec1e06f54ca) Change-Id: I8fca8c32ec1f255bf5f5a37f44a39901af34408b Reviewed-on: https://gerrit.openafs.org/12810 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Michael Laß Reviewed-by: Stephan Wiesand --- src/afs/LINUX/osi_compat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h index 78be4967b1..17a61cfa37 100644 --- a/src/afs/LINUX/osi_compat.h +++ b/src/afs/LINUX/osi_compat.h @@ -606,7 +606,7 @@ afs_file_read(struct file *filp, char __user *buf, size_t len, loff_t *pos) #if defined(HAVE_LINUX___VFS_WRITE) return __vfs_read(filp, buf, len, pos); #elif defined(HAVE_LINUX_KERNEL_WRITE) -# if defined(LINUX_KERNEL_READ_OFFSET_IS_LAST) +# if defined(KERNEL_READ_OFFSET_IS_LAST) return kernel_read(filp, buf, len, pos); # else return kernel_read(filp, *pos, buf, len); @@ -622,7 +622,7 @@ afs_file_write(struct file *filp, char __user *buf, size_t len, loff_t *pos) #if defined(HAVE_LINUX___VFS_WRITE) return __vfs_write(filp, buf, len, pos); #elif defined(HAVE_LINUX_KERNEL_WRITE) -# if defined(LINUX_KERNEL_READ_OFFSET_IS_LAST) +# if defined(KERNEL_READ_OFFSET_IS_LAST) return kernel_write(filp, buf, len, pos); # else return kernel_write(filp, buf, len, *pos);