]> git.baikalelectronics.ru Git - kernel.git/commit
ext2: avoid deleting xattr block that is being reused
authorJan Kara <jack@suse.cz>
Tue, 12 Jul 2022 10:54:27 +0000 (12:54 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 3 Aug 2022 03:56:25 +0000 (23:56 -0400)
commit84303dca3de659e67314412a00e1b55e54b4e5fb
treef7365028252193ab01236fa973e133f4313f24eb
parent20bc713aa6da235e124c06540c5e253b80df4773
ext2: avoid deleting xattr block that is being reused

Currently when we decide to reuse xattr block we detect the case when
the last reference to xattr block is being dropped at the same time and
cancel the reuse attempt. Convert ext2 to a new scheme when as soon as
matching mbcache entry is found, we wait with dropping the last xattr
block reference until mbcache entry reference is dropped (meaning either
the xattr block reference is increased or we decided not to reuse the
block).

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220712105436.32204-8-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext2/xattr.c