Skip to content
Commit 6c3636eb authored by Sweet Tea Dorminy's avatar Sweet Tea Dorminy Committed by David Sterba
Browse files

btrfs: restore inode creation before xattr setting



According to the tree checker, "all xattrs with a given objectid follow
the inode with that objectid in the tree" is an invariant. This was
broken by the recent change "btrfs: move common inode creation code into
btrfs_create_new_inode()", which moved acl creation and property
inheritance (stored in xattrs) to before inode insertion into the tree.
As a result, under certain timings, the xattrs could be written to the
tree before the inode, causing the tree checker to report violation of
the invariant.

Move property inheritance and acl creation back to their old ordering
after the inode insertion.

Suggested-by: default avatarOmar Sandoval <osandov@osandov.com>
Reported-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: default avatarSweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent caae78e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment