sendfile: remove .sendfile from filesystems that use generic_file_sendfile()
They can use generic_file_splice_read() instead. Since sys_sendfile() now prefers that, there should be no change in behaviour. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
@@ -47,8 +47,9 @@ coda_file_read(struct file *coda_file, char __user *buf, size_t count, loff_t *p
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
coda_file_sendfile(struct file *coda_file, loff_t *ppos, size_t count,
|
||||
read_actor_t actor, void *target)
|
||||
coda_file_splice_read(struct file *coda_file, loff_t *ppos,
|
||||
struct pipe_inode_info *pipe, size_t count,
|
||||
unsigned int flags)
|
||||
{
|
||||
struct coda_file_info *cfi;
|
||||
struct file *host_file;
|
||||
@@ -57,10 +58,10 @@ coda_file_sendfile(struct file *coda_file, loff_t *ppos, size_t count,
|
||||
BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
|
||||
host_file = cfi->cfi_container;
|
||||
|
||||
if (!host_file->f_op || !host_file->f_op->sendfile)
|
||||
if (!host_file->f_op || !host_file->f_op->splice_read)
|
||||
return -EINVAL;
|
||||
|
||||
return host_file->f_op->sendfile(host_file, ppos, count, actor, target);
|
||||
return host_file->f_op->splice_read(host_file, ppos, pipe, count,flags);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
@@ -295,6 +296,6 @@ const struct file_operations coda_file_operations = {
|
||||
.flush = coda_flush,
|
||||
.release = coda_release,
|
||||
.fsync = coda_fsync,
|
||||
.sendfile = coda_file_sendfile,
|
||||
.splice_read = coda_file_splice_read,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user