summaryrefslogtreecommitdiff
path: root/fs/read_write.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-06-11 12:18:52 +0200
committerJens Axboe <jens.axboe@oracle.com>2007-07-10 08:04:15 +0200
commitd96e6e71647846e0dab097efd9b8bf3a3a556dca (patch)
treeb6d88df83dae5ab470ad51af77b42a5c22a93dc9 /fs/read_write.c
parentd054fe3d10cc1f9aec01378c38caa32dffdd0090 (diff)
downloadkernel-common-d96e6e71647846e0dab097efd9b8bf3a3a556dca.tar.gz
kernel-common-d96e6e71647846e0dab097efd9b8bf3a3a556dca.tar.bz2
kernel-common-d96e6e71647846e0dab097efd9b8bf3a3a556dca.zip
Remove remnants of sendfile()
There are now zero users of .sendfile() in the kernel, so kill it from the file_operations structure and in do_sendfile(). Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 2527cf035b0e..507ddff48a9a 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -724,8 +724,7 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
in_inode = in_file->f_path.dentry->d_inode;
if (!in_inode)
goto fput_in;
- if (!in_file->f_op || (!in_file->f_op->sendfile &&
- !in_file->f_op->splice_read))
+ if (!in_file->f_op || !in_file->f_op->splice_read)
goto fput_in;
retval = -ESPIPE;
if (!ppos)
@@ -778,21 +777,18 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
count = max - pos;
}
- if (in_file->f_op->splice_read) {
- fl = 0;
+ fl = 0;
#if 0
- /*
- * We need to debate whether we can enable this or not. The
- * man page documents EAGAIN return for the output at least,
- * and the application is arguably buggy if it doesn't expect
- * EAGAIN on a non-blocking file descriptor.
- */
- if (in_file->f_flags & O_NONBLOCK)
- fl = SPLICE_F_NONBLOCK;
+ /*
+ * We need to debate whether we can enable this or not. The
+ * man page documents EAGAIN return for the output at least,
+ * and the application is arguably buggy if it doesn't expect
+ * EAGAIN on a non-blocking file descriptor.
+ */
+ if (in_file->f_flags & O_NONBLOCK)
+ fl = SPLICE_F_NONBLOCK;
#endif
- retval = do_splice_direct(in_file, ppos, out_file, count, fl);
- } else
- retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file);
+ retval = do_splice_direct(in_file, ppos, out_file, count, fl);
if (retval > 0) {
add_rchar(current, retval);