diff options
author | Jan Kara <jack@suse.cz> | 2022-07-12 12:54:22 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-08-03 05:56:25 +0200 |
commit | 6bc0d63dad7f9f54d381925ee855b402f652fa39 (patch) | |
tree | 63a0dc8ea6c47704e566dccd6da66faa70fcc214 /fs/ext4/xattr.h | |
parent | mbcache: add functions to delete entry if unused (diff) | |
download | linux-6bc0d63dad7f9f54d381925ee855b402f652fa39.tar.xz linux-6bc0d63dad7f9f54d381925ee855b402f652fa39.zip |
ext4: remove EA inode entry from mbcache on inode eviction
Currently we remove EA inode from mbcache as soon as its xattr refcount
drops to zero. However there can be pending attempts to reuse the inode
and thus refcount handling code has to handle the situation when
refcount increases from zero anyway. So save some work and just keep EA
inode in mbcache until it is getting evicted. At that moment we are sure
following iget() of EA inode will fail anyway (or wait for eviction to
finish and load things from the disk again) and so removing mbcache
entry at that moment is fine and simplifies the code a bit.
CC: stable@vger.kernel.org
Fixes: 82939d7999df ("ext4: convert to mbcache2")
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220712105436.32204-3-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/xattr.h')
-rw-r--r-- | fs/ext4/xattr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h index e29101168733..824faf0b15a8 100644 --- a/fs/ext4/xattr.h +++ b/fs/ext4/xattr.h @@ -191,6 +191,7 @@ extern void ext4_xattr_inode_array_free(struct ext4_xattr_inode_array *array); extern int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize, struct ext4_inode *raw_inode, handle_t *handle); +extern void ext4_evict_ea_inode(struct inode *inode); extern const struct xattr_handler *ext4_xattr_handlers[]; |