summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-04-10 14:12:44 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2019-04-10 14:12:44 -0400
commitad7999cd701e4e058765d35cf5274ee16801e986 (patch)
tree61e746c47dc7da004eeafd279d24b31dfc536d31 /lib
parent15ade5d2e7775667cf191cf2f94327a4889f8b9d (diff)
parentf51dcd0f621caac5380ce90fbbeafc32ce4517ae (diff)
downloadlinux-stable-ad7999cd701e4e058765d35cf5274ee16801e986.tar.gz
linux-stable-ad7999cd701e4e058765d35cf5274ee16801e986.tar.bz2
linux-stable-ad7999cd701e4e058765d35cf5274ee16801e986.zip
Merge branch 'fixes' into work.icache
Diffstat (limited to 'lib')
-rw-r--r--lib/iov_iter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index ea36dc355da1..b396d328a764 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -1528,6 +1528,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
struct ahash_request *hash = hashp;
struct scatterlist sg;
size_t copied;
@@ -1537,6 +1538,9 @@ size_t hash_and_copy_to_iter(const void *addr, size_t bytes, void *hashp,
ahash_request_set_crypt(hash, &sg, NULL, copied);
crypto_ahash_update(hash);
return copied;
+#else
+ return 0;
+#endif
}
EXPORT_SYMBOL(hash_and_copy_to_iter);