Remove unused iov_iter_init_compat() wrapper
This compatibility code is no longer needed. For it a while
iov_iter_init_compat() was used by zfs_uio_prefaultpages() but
this code should have been dropped as part of commit 83b91ae1
.
Take care of that oversight and remove it.
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11543
This commit is contained in:
parent
2d4bbd14fc
commit
96a6629872
|
@ -10,31 +10,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
||||||
ITER_IOVEC | ITER_KVEC | ITER_BVEC | ITER_PIPE;
|
ITER_IOVEC | ITER_KVEC | ITER_BVEC | ITER_PIPE;
|
||||||
])
|
])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([iov_iter_init], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/uio.h>
|
|
||||||
],[
|
|
||||||
struct iov_iter iter = { 0 };
|
|
||||||
struct iovec iov;
|
|
||||||
unsigned long nr_segs = 1;
|
|
||||||
size_t count = 1024;
|
|
||||||
|
|
||||||
iov_iter_init(&iter, WRITE, &iov, nr_segs, count);
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([iov_iter_init_legacy], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/uio.h>
|
|
||||||
],[
|
|
||||||
struct iov_iter iter = { 0 };
|
|
||||||
struct iovec iov;
|
|
||||||
unsigned long nr_segs = 1;
|
|
||||||
size_t count = 1024;
|
|
||||||
size_t written = 0;
|
|
||||||
|
|
||||||
iov_iter_init(&iter, &iov, nr_segs, count, written);
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([iov_iter_advance], [
|
ZFS_LINUX_TEST_SRC([iov_iter_advance], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/uio.h>
|
#include <linux/uio.h>
|
||||||
|
@ -114,25 +89,6 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
||||||
enable_vfs_iov_iter="no"
|
enable_vfs_iov_iter="no"
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 'iov_iter_init' available in Linux 3.16 and newer.
|
|
||||||
dnl # 'iov_iter_init_legacy' available in Linux 3.15 and older.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether iov_iter_init() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([iov_iter_init], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_IOV_ITER_INIT, 1,
|
|
||||||
[iov_iter_init() is available])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_RESULT([iov_iter_init_legacy], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_IOV_ITER_INIT_LEGACY, 1,
|
|
||||||
[iov_iter_init() is available])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([iov_iter_init()])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether iov_iter_advance() is available])
|
AC_MSG_CHECKING([whether iov_iter_advance() is available])
|
||||||
ZFS_LINUX_TEST_RESULT([iov_iter_advance], [
|
ZFS_LINUX_TEST_RESULT([iov_iter_advance], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
|
|
@ -111,19 +111,6 @@ zfs_uio_index_at_offset(zfs_uio_t *uio, offset_t off, uint_t *vec_idx)
|
||||||
return (off);
|
return (off);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
|
||||||
iov_iter_init_compat(struct iov_iter *iter, unsigned int dir,
|
|
||||||
const struct iovec *iov, unsigned long nr_segs, size_t count)
|
|
||||||
{
|
|
||||||
#if defined(HAVE_IOV_ITER_INIT)
|
|
||||||
iov_iter_init(iter, dir, iov, nr_segs, count);
|
|
||||||
#elif defined(HAVE_IOV_ITER_INIT_LEGACY)
|
|
||||||
iov_iter_init(iter, iov, nr_segs, count, 0);
|
|
||||||
#else
|
|
||||||
#error "Unsupported kernel"
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
zfs_uio_iovec_init(zfs_uio_t *uio, const struct iovec *iov,
|
zfs_uio_iovec_init(zfs_uio_t *uio, const struct iovec *iov,
|
||||||
unsigned long nr_segs, offset_t offset, zfs_uio_seg_t seg, ssize_t resid,
|
unsigned long nr_segs, offset_t offset, zfs_uio_seg_t seg, ssize_t resid,
|
||||||
|
|
Loading…
Reference in New Issue