summaryrefslogtreecommitdiff
path: root/crypto/crc32c_generic.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-06-29 15:06:58 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2022-07-16 09:19:16 -0400
commit97ef77c52b789ec1411d360ed99dca1efe4b2c81 (patch)
treec17483d04296da08c6a68d745dcf499005f4e7ec /crypto/crc32c_generic.c
parent54ef7a47f67de9e87022a5310d1e8332af3e2696 (diff)
fs: check FMODE_LSEEK to control internal pipe splicing
The original direct splicing mechanism from Jens required the input to be a regular file because it was avoiding the special socket case. It also recognized blkdevs as being close enough to a regular file. But it forgot about chardevs, which behave the same way and work fine here. This is an okayish heuristic, but it doesn't totally work. For example, a few chardevs should be spliceable here. And a few regular files shouldn't. This patch fixes this by instead checking whether FMODE_LSEEK is set, which represents decently enough what we need rewinding for when splicing to internal pipes. Fixes: b92ce5589374 ("[PATCH] splice: add direct fd <-> fd splicing support") Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'crypto/crc32c_generic.c')
0 files changed, 0 insertions, 0 deletions