lkml.org 
[lkml]   [2014]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 15/56] fs/coda: support compiling out splice
Date
Compile out splice support from coda when the splice-family of syscalls is not
supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
fs/coda/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/coda/file.c b/fs/coda/file.c
index d244d74..a9d8c5d 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -42,6 +42,7 @@ coda_file_read(struct file *coda_file, char __user *buf, size_t count, loff_t *p
return host_file->f_op->read(host_file, buf, count, ppos);
}

+#ifdef CONFIG_SYSCALL_SPLICE
static ssize_t
coda_file_splice_read(struct file *coda_file, loff_t *ppos,
struct pipe_inode_info *pipe, size_t count,
@@ -62,6 +63,7 @@ coda_file_splice_read(struct file *coda_file, loff_t *ppos,

return splice_read(host_file, ppos, pipe, count, flags);
}
+#endif /* #ifdef CONFIG_SYSCALL_SPLICE */

static ssize_t
coda_file_write(struct file *coda_file, const char __user *buf, size_t count, loff_t *ppos)
@@ -237,6 +239,6 @@ const struct file_operations coda_file_operations = {
.open = coda_open,
.release = coda_release,
.fsync = coda_fsync,
- .splice_read = coda_file_splice_read,
+ SPLICE_READ_INIT(coda_file_splice_read)
};

--
1.9.1


\
 
 \ /
  Last update: 2014-11-13 23:01    [W:0.023 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site