io_uring: fix zero len do_splice()
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 4 May 2020 20:00:54 +0000 (23:00 +0300)
committerJens Axboe <axboe@kernel.dk>
Sat, 9 May 2020 16:16:10 +0000 (10:16 -0600)
commitc96874265cd04b4bd4a8e114ac9af039a6d83cfe
treecae6a3895c52a37ab4215f262e76c319d78a8dbd
parent63ff822358b276137059520cf16e587e8073e80f
io_uring: fix zero len do_splice()

do_splice() doesn't expect len to be 0. Just always return 0 in this
case as splice(2) does.

Fixes: 7d67af2c0134 ("io_uring: add splice(2) support")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c