mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-19 06:26:28 +00:00
Fix indx delete using wrong xid, leaving orphans.
During inode deletion, scoutfs_xattr_drop forgot to set the xid of the xattr after calling parse_indx_key, which hardcodes xid=0, and it is the callers' responsibility. delete_force then deletes the wrong key, and returns no errors on nonexistant keys. So now there is a pending deletion for a non-existant indx and an orphan indx entry in the tree. Subsequent calls to `scoutfs read-xattr-index` will thus return entries for deleted inodes. Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
@@ -1265,6 +1265,7 @@ int scoutfs_xattr_drop(struct super_block *sb, u64 ino,
|
||||
ret = parse_indx_key(&tag_key, xat->name, xat->name_len, ino);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
scoutfs_xattr_set_indx_key_xid(&tag_key, le64_to_cpu(key.skx_id));
|
||||
}
|
||||
|
||||
if ((tgs.totl || tgs.indx) && locked_zone != tag_key.sk_zone) {
|
||||
|
||||
Reference in New Issue
Block a user