mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
Fix macro used to check kernel_read() argument order
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 <andersk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit edc5463f3d
)
Change-Id: I7bc6615118f1200d3f257e7a01652b49b458a8fa
Reviewed-on: https://gerrit.openafs.org/12809
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
3cae0a01d0
commit
383688fa0d
@ -659,7 +659,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);
|
||||
@ -675,7 +675,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);
|
||||
|
Loading…
Reference in New Issue
Block a user