Skip to content
Commit cc56f7de authored by Changli Gao's avatar Changli Gao Committed by Jens Axboe
Browse files

sendfile(): check f_op.splice_write() rather than f_op.sendpage()



sendfile(2) was reworked with the splice infrastructure, but it still
checks f_op.sendpage() instead of f_op.splice_write() wrongly.  Although
if f_op.sendpage() exists, f_op.splice_write() always exists at the same
time currently, the assumption will be broken in future silently.  This
patch also brings a side effect: sendfile(2) can work with any output
file.  Some security checks related to f_op are added too.

Signed-off-by: default avatarChangli Gao <xiaosuo@gmail.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent f21121cd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment