splice: Make do_splice_to() generic and export it
authorDavid Howells <dhowells@redhat.com>
Wed, 15 Mar 2023 16:35:36 +0000 (16:35 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Mar 2023 17:46:47 +0000 (11:46 -0600)
commit6dc39c2949ee71ee9996d6190d374512ecf44982
tree3d4e02737b7da5946df9b80597b73defe961d6fe
parente75f0c6756708174a6e345ca56476e7fa291b0df
splice: Make do_splice_to() generic and export it

Rename do_splice_to() to vfs_splice_read() and export it so that it can be
used as a helper when calling down to a lower layer filesystem as it
performs all the necessary checks[1].

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
cc: Miklos Szeredi <miklos@szeredi.hu>
cc: Jens Axboe <axboe@kernel.dk>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: John Hubbard <jhubbard@nvidia.com>
cc: David Hildenbrand <david@redhat.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: linux-unionfs@vger.kernel.org
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Link: https://lore.kernel.org/r/CAJfpeguGksS3sCigmRi9hJdUec8qtM9f+_9jC1rJhsXT+dV01w@mail.gmail.com/
Link: https://lore.kernel.org/r/20230315163549.295454-2-dhowells@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/splice.c
include/linux/splice.h