1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00
nixpkgs/pkgs/servers/openafs-client/ae86b07f827d6f3e2032a412f5f6cb3951a27d2d.patch
2014-09-23 21:33:25 +02:00

52 lines
1.9 KiB
Diff

From e284db57f94c8f97ed1c95dcd0bd9518d86c050c Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed, 18 Jun 2014 08:53:48 -0400
Subject: [PATCH] Linux 3.16: Switch to iter_file_splice_write
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 | 3 +++
src/afs/LINUX/osi_vnodeops.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index ae8f1ed..9e39d90 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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);])
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 6f4000b..2685915 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -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,
--
1.7.1