diff --git a/acinclude.m4 b/acinclude.m4 index 0d28d44156..162a3e9c3f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1001,9 +1001,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) dnl Function existence checks - AC_CHECK_LINUX_FUNC([__vfs_read], + AC_CHECK_LINUX_FUNC([__vfs_write], [#include ], - [__vfs_read(NULL, NULL, 0, NULL);]) + [__vfs_write(NULL, NULL, 0, NULL);]) AC_CHECK_LINUX_FUNC([bdi_init], [#include ], [bdi_init(NULL);]) diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h index 14762fab1c..13915b9d17 100644 --- a/src/afs/LINUX/osi_compat.h +++ b/src/afs/LINUX/osi_compat.h @@ -648,7 +648,7 @@ afs_d_invalidate(struct dentry *dp) static inline int afs_file_read(struct file *filp, char __user *buf, size_t len, loff_t *pos) { -#if defined(HAVE_LINUX___VFS_READ) +#if defined(HAVE_LINUX___VFS_WRITE) return __vfs_read(filp, buf, len, pos); #else return filp->f_op->read(filp, buf, len, pos); @@ -658,7 +658,7 @@ afs_file_read(struct file *filp, char __user *buf, size_t len, loff_t *pos) static inline int afs_file_write(struct file *filp, char __user *buf, size_t len, loff_t *pos) { -#if defined(HAVE_LINUX___VFS_READ) +#if defined(HAVE_LINUX___VFS_WRITE) return __vfs_write(filp, buf, len, pos); #else return filp->f_op->write(filp, buf, len, pos); diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index d0585458da..d935cf56df 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -825,7 +825,7 @@ struct file_operations afs_file_fops = { #ifdef STRUCT_FILE_OPERATIONS_HAS_READ_ITER .read_iter = afs_linux_read_iter, .write_iter = afs_linux_write_iter, -# if !defined(HAVE_LINUX___VFS_READ) +# if !defined(HAVE_LINUX___VFS_WRITE) .read = new_sync_read, .write = new_sync_write, # endif