linux-brain/drivers/block/drbd
Eric Biggers 877b5691f2 crypto: shash - remove shash_desc::flags
The flags field in 'struct shash_desc' never actually does anything.
The only ostensibly supported flag is CRYPTO_TFM_REQ_MAY_SLEEP.
However, no shash algorithm ever sleeps, making this flag a no-op.

With this being the case, inevitably some users who can't sleep wrongly
pass MAY_SLEEP.  These would all need to be fixed if any shash algorithm
actually started sleeping.  For example, the shash_ahash_*() functions,
which wrap a shash algorithm with the ahash API, pass through MAY_SLEEP
from the ahash API to the shash API.  However, the shash functions are
called under kmap_atomic(), so actually they're assumed to never sleep.

Even if it turns out that some users do need preemption points while
hashing large buffers, we could easily provide a helper function
crypto_shash_update_large() which divides the data into smaller chunks
and calls crypto_shash_update() and cond_resched() for each chunk.  It's
not necessary to have a flag in 'struct shash_desc', nor is it necessary
to make individual shash algorithms aware of this at all.

Therefore, remove shash_desc::flags, and document that the
crypto_shash_*() functions can be called from any context.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-04-25 15:38:12 +08:00
..
drbd_actlog.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
drbd_bitmap.c drbd: convert to bioset_init()/mempool_init() 2018-05-30 15:33:32 -06:00
drbd_debugfs.c drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") 2018-12-20 09:51:31 -07:00
drbd_debugfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_int.h drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") 2018-12-20 09:51:31 -07:00
drbd_interval.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_interval.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_main.c drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") 2018-12-20 09:51:31 -07:00
drbd_nl.c drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") 2018-12-20 09:51:31 -07:00
drbd_nla.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_nla.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_proc.c drbd: switch to proc_create_single 2018-05-16 07:24:30 +02:00
drbd_protocol.h drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") 2018-12-20 09:51:31 -07:00
drbd_receiver.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
drbd_req.c drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") 2018-12-20 09:51:31 -07:00
drbd_req.h drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") 2018-12-20 09:51:31 -07:00
drbd_state_change.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_state.c drbd: Change drbd_request_detach_interruptible's return type to int 2018-12-20 09:51:31 -07:00
drbd_state.h drbd: Change drbd_request_detach_interruptible's return type to int 2018-12-20 09:51:31 -07:00
drbd_strings.c drbd: code cleanups without semantic changes 2016-06-13 21:43:07 -06:00
drbd_strings.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_vli.h Fix common misspellings 2011-03-31 11:26:23 -03:00
drbd_worker.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
Kconfig drivers/block: remove redundant 'default n' from Kconfig-s 2018-10-10 14:11:08 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00