The following commit:
commit
eb031849d52e61d24ba54e9d27553189ff328174
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Sep 1 17:39:23 2017 +0200
fs: unexport __vfs_read/__vfs_write
unexports both __vfs_read and __vfs_write, but keeps the former in
fs.h--as it is is still being used by another part of the tree.
This situation results in a false positive in our Autoconf check,
which does not see the export statements, and ends up marking the
corresponding API as available.
That, in turn, causes some code which assumes symmetry with
__vfs_write to fail to compile.
Switch to testing for __vfs_write, which correctly marks the API as
unavailable.
Change-Id: I392f2b17b4de7bd81d549c84e6f7b5ef05e1b999
Reviewed-on: https://gerrit.openafs.org/12728
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
dnl Function existence checks
- AC_CHECK_LINUX_FUNC([__vfs_read],
+ AC_CHECK_LINUX_FUNC([__vfs_write],
[#include <linux/fs.h>],
- [__vfs_read(NULL, NULL, 0, NULL);])
+ [__vfs_write(NULL, NULL, 0, NULL);])
AC_CHECK_LINUX_FUNC([bdi_init],
[#include <linux/backing-dev.h>],
[bdi_init(NULL);])
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);
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);
#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