On Wed, May 18, 2022 at 11:54:47AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > If a setxattr operation finds an xattr structure in leaf format, adding > the attr can fail due to lack of space and hence requires an upgrade to > node format. After this happens, we'll roll the transaction and > re-enter the state machine, at which time we need to perform a second > lookup of the attribute name to find its new location. This lookup > attaches a new da state structure to the xfs_attr_item but doesn't free > the old one (from the leaf lookup) and leaks it. Fix that. > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > Reviewed-by: Allison Henderson <allison.henderson@xxxxxxxxxx> > --- > fs/xfs/libxfs/xfs_attr.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) Looks OK. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx