]> 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)
commit7cf51416b2f73fe11c93caee8a0aa221ea6bc66d
treef7365028252193ab01236fa973e133f4313f24eb
parent981d39095ffdcb9df1fa1279c2f909c77fcb33bd
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