From bb58193c04cfa677d76a7a309747491a11c86355 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Fri, 26 Apr 2019 16:50:48 -0500 Subject: [PATCH] libxfs: don't touch buffer log item pointer when flushing inode log item When we're flushing an inode log item, it is not necessary to mess with the inode cluster buffer's log item because the iflush code paths pass the inode log item directly. The unconditional reset causes us to leak buffer log items. Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- libxfs/trans.c | 2 -- libxfs/util.c | 1 - 2 files changed, 3 deletions(-) diff --git a/libxfs/trans.c b/libxfs/trans.c index 121636b5d..b4589d0a9 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -826,10 +826,8 @@ inode_item_done( * of whether the flush succeed or not. If we fail the flush, make sure * we still release the buffer reference we currently hold. */ - bp->b_log_item = iip; error = libxfs_iflush_int(ip, bp); ip->i_transp = NULL; /* disassociate from transaction */ - bp->b_log_item = NULL; /* remove log item */ bp->b_transp = NULL; /* remove xact ptr */ if (error) { diff --git a/libxfs/util.c b/libxfs/util.c index ea75fa206..9fe9a3672 100644 --- a/libxfs/util.c +++ b/libxfs/util.c @@ -394,7 +394,6 @@ libxfs_iflush_int(xfs_inode_t *ip, xfs_buf_t *bp) xfs_dinode_t *dip; xfs_mount_t *mp; - ASSERT(bp-b_log_item != NULL); ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || ip->i_d.di_nextents > ip->i_df.if_ext_max); ASSERT(ip->i_d.di_version > 1); -- 2.47.2