Linux 3.16: Switch to iter_file_splice_write
authorMarc Dionne <marc.dionne@your-file-system.com>
Wed, 18 Jun 2014 12:53:48 +0000 (08:53 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 25 Jun 2014 14:23:19 +0000 (10:23 -0400)
Users of generic_file_splice_write need to switch to
using iter_file_splice_write.

Change-Id: If4801d27e030e1cb986f483cf437a2cfa7398eb3
Reviewed-on: http://gerrit.openafs.org/11302
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

acinclude.m4
src/afs/LINUX/osi_vnodeops.c

index ae8f1ed..9e39d90 100644 (file)
@@ -958,6 +958,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([inode_setattr],
                                     [#include <linux/fs.h>],
                                     [inode_setattr(NULL, NULL);])
+                AC_CHECK_LINUX_FUNC([iter_file_splice_write],
+                                    [#include <linux/fs.h>],
+                                    [iter_file_splice_write(NULL,NULL,NULL,0,0);])
                 AC_CHECK_LINUX_FUNC([kernel_setsockopt],
                                     [#include <linux/net.h>],
                                     [kernel_setsockopt(NULL, 0, 0, NULL, 0);])
index 6f4000b..2685915 100644 (file)
@@ -827,7 +827,11 @@ struct file_operations afs_file_fops = {
   .sendfile =   generic_file_sendfile,
 #endif
 #if defined(STRUCT_FILE_OPERATIONS_HAS_SPLICE)
+# if defined(HAVE_LINUX_ITER_FILE_SPLICE_WRITE)
+  .splice_write = iter_file_splice_write,
+# else
   .splice_write = generic_file_splice_write,
+# endif
   .splice_read = generic_file_splice_read,
 #endif
   .release =   afs_linux_release,