diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2020-06-12 08:57:37 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-06-30 15:34:23 +0200 |
commit | 7999096fa9cfd0253497c8d2ed9a5a1537521d25 (patch) | |
tree | 461e813d6748825b84b48a8ffa2aaf606d726473 /lib | |
parent | dlmfs: clean up dlmfs_file_{read,write}() a bit (diff) | |
download | linux-7999096fa9cfd0253497c8d2ed9a5a1537521d25.tar.xz linux-7999096fa9cfd0253497c8d2ed9a5a1537521d25.zip |
iov_iter: Move unnecessary inclusion of crypto/hash.h
The header file linux/uio.h includes crypto/hash.h which pulls in
most of the Crypto API. Since linux/uio.h is used throughout the
kernel this means that every tiny bit of change to the Crypto API
causes the entire kernel to get rebuilt.
This patch fixes this by moving it into lib/iov_iter.c instead
where it is actually used.
This patch also fixes the ifdef to use CRYPTO_HASH instead of just
CRYPTO which does not guarantee the existence of ahash.
Unfortunately a number of drivers were relying on linux/uio.h to
provide access to linux/slab.h. This patch adds inclusions of
linux/slab.h as detected by build failures.
Also skbuff.h was relying on this to provide a declaration for
ahash_request. This patch adds a forward declaration instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iov_iter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index bf538c2bec77..5e40786c8f12 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only +#include <crypto/hash.h> #include <linux/export.h> #include <linux/bvec.h> #include <linux/uio.h> @@ -1567,7 +1568,7 @@ EXPORT_SYMBOL(csum_and_copy_to_iter); size_t hash_and_copy_to_iter(const void *addr, size_t bytes, void *hashp, struct iov_iter *i) { -#ifdef CONFIG_CRYPTO +#ifdef CONFIG_CRYPTO_HASH struct ahash_request *hash = hashp; struct scatterlist sg; size_t copied; |