@@ -386,49 +386,6 @@ ssize_t copy_splice_read(struct file *in, loff_t *ppos,
386
386
}
387
387
EXPORT_SYMBOL (copy_splice_read );
388
388
389
- /**
390
- * generic_file_splice_read - splice data from file to a pipe
391
- * @in: file to splice from
392
- * @ppos: position in @in
393
- * @pipe: pipe to splice to
394
- * @len: number of bytes to splice
395
- * @flags: splice modifier flags
396
- *
397
- * Description:
398
- * Will read pages from given file and fill them into a pipe. Can be
399
- * used as long as it has more or less sane ->read_iter().
400
- *
401
- */
402
- ssize_t generic_file_splice_read (struct file * in , loff_t * ppos ,
403
- struct pipe_inode_info * pipe , size_t len ,
404
- unsigned int flags )
405
- {
406
- struct iov_iter to ;
407
- struct kiocb kiocb ;
408
- int ret ;
409
-
410
- iov_iter_pipe (& to , ITER_DEST , pipe , len );
411
- init_sync_kiocb (& kiocb , in );
412
- kiocb .ki_pos = * ppos ;
413
- ret = call_read_iter (in , & kiocb , & to );
414
- if (ret > 0 ) {
415
- * ppos = kiocb .ki_pos ;
416
- file_accessed (in );
417
- } else if (ret < 0 ) {
418
- /* free what was emitted */
419
- pipe_discard_from (pipe , to .start_head );
420
- /*
421
- * callers of ->splice_read() expect -EAGAIN on
422
- * "can't put anything in there", rather than -EFAULT.
423
- */
424
- if (ret == - EFAULT )
425
- ret = - EAGAIN ;
426
- }
427
-
428
- return ret ;
429
- }
430
- EXPORT_SYMBOL (generic_file_splice_read );
431
-
432
389
const struct pipe_buf_operations default_pipe_buf_ops = {
433
390
.release = generic_pipe_buf_release ,
434
391
.try_steal = generic_pipe_buf_try_steal ,
0 commit comments