]> git.baikalelectronics.ru Git - kernel.git/commit
mbcache: automatically delete entries from cache on freeing
authorJan Kara <jack@suse.cz>
Tue, 12 Jul 2022 10:54:29 +0000 (12:54 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 3 Aug 2022 03:56:25 +0000 (23:56 -0400)
commit07d57c4e53b49ecd5918c95553a8cfb0183e6181
tree254b1af58915e13b0d5924bb4120089c94ec4645
parent1659f7fc335cf82aba7127bab5c9c6ccc45b10da
mbcache: automatically delete entries from cache on freeing

Use the fact that entries with elevated refcount are not removed from
the hash and just move removal of the entry from the hash to the entry
freeing time. When doing this we also change the generic code to hold
one reference to the cache entry, not two of them, which makes code
somewhat more obvious.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220712105436.32204-10-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/mbcache.c
include/linux/mbcache.h