OSDN Git Service

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)
commit1189d8ec5105f7628fb0e3a6988cbf0d0cbfedeb
treef7365028252193ab01236fa973e133f4313f24eb
parentb67798d55185ba4471f70b67b3f7c2866f216499
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