diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-06-11 06:18:52 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-07-10 02:04:15 -0400 |
commit | d96e6e71647846e0dab097efd9b8bf3a3a556dca (patch) | |
tree | b6d88df83dae5ab470ad51af77b42a5c22a93dc9 /fs/read_write.c | |
parent | d054fe3d10cc1f9aec01378c38caa32dffdd0090 (diff) |
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.c | 26 |
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, | |||
724 | in_inode = in_file->f_path.dentry->d_inode; | 724 | in_inode = in_file->f_path.dentry->d_inode; |
725 | if (!in_inode) | 725 | if (!in_inode) |
726 | goto fput_in; | 726 | goto fput_in; |
727 | if (!in_file->f_op || (!in_file->f_op->sendfile && | 727 | if (!in_file->f_op || !in_file->f_op->splice_read) |
728 | !in_file->f_op->splice_read)) | ||
729 | goto fput_in; | 728 | goto fput_in; |
730 | retval = -ESPIPE; | 729 | retval = -ESPIPE; |
731 | if (!ppos) | 730 | if (!ppos) |
@@ -778,21 +777,18 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, | |||
778 | count = max - pos; | 777 | count = max - pos; |
779 | } | 778 | } |
780 | 779 | ||
781 | if (in_file->f_op->splice_read) { | 780 | fl = 0; |
782 | fl = 0; | ||
783 | #if 0 | 781 | #if 0 |
784 | /* | 782 | /* |
785 | * We need to debate whether we can enable this or not. The | 783 | * We need to debate whether we can enable this or not. The |
786 | * man page documents EAGAIN return for the output at least, | 784 | * man page documents EAGAIN return for the output at least, |
787 | * and the application is arguably buggy if it doesn't expect | 785 | * and the application is arguably buggy if it doesn't expect |
788 | * EAGAIN on a non-blocking file descriptor. | 786 | * EAGAIN on a non-blocking file descriptor. |
789 | */ | 787 | */ |
790 | if (in_file->f_flags & O_NONBLOCK) | 788 | if (in_file->f_flags & O_NONBLOCK) |
791 | fl = SPLICE_F_NONBLOCK; | 789 | fl = SPLICE_F_NONBLOCK; |
792 | #endif | 790 | #endif |
793 | retval = do_splice_direct(in_file, ppos, out_file, count, fl); | 791 | retval = do_splice_direct(in_file, ppos, out_file, count, fl); |
794 | } else | ||
795 | retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file); | ||
796 | 792 | ||
797 | if (retval > 0) { | 793 | if (retval > 0) { |
798 | add_rchar(current, retval); | 794 | add_rchar(current, retval); |