diff options
author | Luis Henriques <lhenriques@suse.de> | 2024-01-30 10:13:44 +0000 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2024-05-09 16:28:58 +0300 |
commit | 9578e327b2b4935a25d49e3891b8fcca9b6c10c6 (patch) | |
tree | 5b61b324bd79925ebcc6cae2139a4b81a084bd0e /fs/affs/bitmap.c | |
parent | 45db3ab70092637967967bfd8e6144017638563c (diff) |
keys: update key quotas in key_put()
Delaying key quotas update when key's refcount reaches 0 in key_put() has
been causing some issues in fscrypt testing, specifically in fstest
generic/581. This commit fixes this test flakiness by dealing with the
quotas immediately, and leaving all the other clean-ups to the key garbage
collector.
This is done by moving the updates to the qnkeys and qnbytes fields in
struct key_user from key_gc_unused_keys() into key_put(). Unfortunately,
this also means that we need to switch to the irq-version of the spinlock
that protects these fields and use spin_lock_{irqsave,irqrestore} in all
the code that touches these fields.
Signed-off-by: Luis Henriques <lhenriques@suse.de>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@kernel.org>
Diffstat (limited to 'fs/affs/bitmap.c')
0 files changed, 0 insertions, 0 deletions