]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: don't touch buffer log item pointer when flushing inode log item
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 21:50:48 +0000 (16:50 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 26 Apr 2019 21:50:48 +0000 (16:50 -0500)
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 <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/trans.c
libxfs/util.c

index 121636b5d93329f62c71ac6992b16429ca6f21b9..b4589d0a916ce4862f08db97649642ec5e19d5ee 100644 (file)
@@ -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) {
index ea75fa206c109dc5801df55f5c59e46ceb7a527b..9fe9a3672fa537ee34e7d6db80787340de141b6e 100644 (file)
@@ -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);