From: Pieter Smith <pieter@boesman.nl>
To: pieter@boesman.nl
Cc: Josh Triplett <josh@joshtriplett.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 09/56] fs/bad_inode: support compiling out splice
Date: Thu, 13 Nov 2014 22:22:46 +0100 [thread overview]
Message-ID: <1415913813-362-10-git-send-email-pieter@boesman.nl> (raw)
In-Reply-To: <1415913813-362-1-git-send-email-pieter@boesman.nl>
Compile out splice support from bad_inode when the splice-family of syscalls is
not supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).
add/remove: 0/2 grow/shrink: 0/0 up/down: 0/-12 (-12)
function old new delta
bad_file_splice_write 6 - -6
bad_file_splice_read 6 - -6
Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
fs/bad_inode.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/bad_inode.c b/fs/bad_inode.c
index afd2b44..ccb076d 100644
--- a/fs/bad_inode.c
+++ b/fs/bad_inode.c
@@ -131,14 +131,16 @@ static int bad_file_flock(struct file *filp, int cmd, struct file_lock *fl)
return -EIO;
}
-static ssize_t bad_file_splice_write(struct pipe_inode_info *pipe,
+static ssize_t __maybe_unused bad_file_splice_write(
+ struct pipe_inode_info *pipe,
struct file *out, loff_t *ppos, size_t len,
unsigned int flags)
{
return -EIO;
}
-static ssize_t bad_file_splice_read(struct file *in, loff_t *ppos,
+static ssize_t __maybe_unused bad_file_splice_read(
+ struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{
@@ -168,8 +170,8 @@ static const struct file_operations bad_file_ops =
.get_unmapped_area = bad_file_get_unmapped_area,
.check_flags = bad_file_check_flags,
.flock = bad_file_flock,
- .splice_write = bad_file_splice_write,
- .splice_read = bad_file_splice_read,
+ SPLICE_WRITE_INIT(bad_file_splice_write)
+ SPLICE_READ_INIT(bad_file_splice_read)
};
static int bad_inode_create (struct inode *dir, struct dentry *dentry,
--
1.9.1
next prev parent reply other threads:[~2014-11-13 21:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <pieter@boesman.nl>
[not found] ` <1415913813-362-1-git-send-email-pieter@boesman.nl>
2014-11-13 21:22 ` [PATCH 01/56] moved sendfile syscall to splice translation unit Pieter Smith
2014-11-13 21:22 ` [PATCH 02/56] moved kernel_write out of " Pieter Smith
[not found] ` <1415913813-362-1-git-send-email-pieter-qeJ+1H9vRZbz+pZb47iToQ@public.gmane.org>
2014-11-13 21:22 ` [PATCH 03/56] fs: Support compiling out splice-family syscalls Pieter Smith
2014-11-13 21:22 ` [PATCH 04/56] fs: Macros to define splice file_operations Pieter Smith
2014-11-13 21:49 ` Richard Weinberger
2014-11-13 22:24 ` josh
2014-11-13 21:51 ` Al Viro
2014-11-13 21:22 ` [PATCH 07/56] fs/affs: support compiling out splice Pieter Smith
2014-11-13 21:22 ` Pieter Smith [this message]
2014-11-13 21:22 ` [PATCH 10/56] fs/block_dev: " Pieter Smith
2014-11-13 21:23 ` [PATCH 25/56] fs/hfs: " Pieter Smith
2014-11-13 21:23 ` [PATCH 26/56] fs/hfsplus: " Pieter Smith
2014-11-13 21:23 ` [PATCH 50/56] fs/read_write: " Pieter Smith
2014-11-13 21:23 ` [PATCH 56/56] fs/splice: full support for " Pieter Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415913813-362-10-git-send-email-pieter@boesman.nl \
--to=pieter@boesman.nl \
--cc=josh@joshtriplett.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).