xfs: replay unlocked parent pointer updates that accrue during xattr repair
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 16:48:11 +0000 (09:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 23:55:14 +0000 (16:55 -0700)
commite5d7ce0364d8ee6821fd93814885c3bef775b9c3
tree2f7b118bd974f394ead261c545273ada255dab68
parent8559b21a64d983315bdf1bd9f8dfdf732c56d057
xfs: replay unlocked parent pointer updates that accrue during xattr repair

There are a few places where the extended attribute repair code drops
the ILOCK to apply stashed xattrs to the temporary file.  Although
setxattr and removexattr are still locked out because we retain our hold
on the IOLOCK, this doesn't prevent renames from updating parent
pointers, because the VFS doesn't take i_rwsem on children that are
being moved.

Therefore, set up a dirent hook to capture parent pointer updates for
this file, and replay(?) the updates.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/attr_repair.c
fs/xfs/scrub/trace.h