]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
random: convert to using fops->write_iter()
authorJens Axboe <axboe@kernel.dk>
Thu, 19 May 2022 23:43:15 +0000 (17:43 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 May 2022 07:24:09 +0000 (09:24 +0200)
commitfdb1b354e301dd2aa56df862b9d4894b79039c40
treea8ab6d4c2dc99cb13f0d608511df73890700c6d3
parent09ea8bc7276aead310e5faa21ae29ceeecea87c9
random: convert to using fops->write_iter()

commit 22b0a222af4df8ee9bb8e07013ab44da9511b047 upstream.

Now that the read side has been converted to fix a regression with
splice, convert the write side as well to have some symmetry in the
interface used (and help deprecate ->write()).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
[Jason: cleaned up random_ioctl a bit, require full writes in
 RNDADDENTROPY since it's crediting entropy, simplify control flow of
 write_pool(), and incorporate suggestions from Al.]
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c