/dev/zero: also implement ->read
authorChristoph Hellwig <hch@lst.de>
Thu, 3 Sep 2020 15:59:22 +0000 (17:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 17:50:47 +0000 (19:50 +0200)
commit99f667352f6c938440d9043d0f66f859d6f3d50d
treebf5c687509f17d774cd978ac684c2a2c157d6ca2
parent261e7818f06ec51e488e007f787ccd7e77272918
/dev/zero: also implement ->read

Christophe reported a major speedup due to avoiding the iov_iter
overhead, so just add this trivial function.  Note that /dev/zero
already implements both an iter and non-iter writes so this just
makes it more symmetric.

Tested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20200903155922.1111551-1-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/mem.c