splice: simplify a conditional in copy_splice_read
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Jun 2023 14:03:39 +0000 (16:03 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 16 Jun 2023 16:08:08 +0000 (10:08 -0600)
commit2e82f6c3bfd1acde2610dd9feb4f2b264c4ef742
tree8e0f5138315a2d8ac14c04658ced8b5b6415716a
parent0b24be4691c9e6ea13ca70050d42a9f9032fa788
splice: simplify a conditional in copy_splice_read

Check for -EFAULT instead of wrapping the check in an ret < 0 block.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20230614140341.521331-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/splice.c