xfs: Capture state of the right inode in xfs_iflush_done
authorCarlos Maiolino <cmaiolino@redhat.com>
Fri, 22 Sep 2017 18:47:46 +0000 (11:47 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 26 Sep 2017 17:55:20 +0000 (10:55 -0700)
My previous patch: d3a304b6292168b83b45d624784f973fdc1ca674 check for
XFS_LI_FAILED flag xfs_iflush done, so the failed item can be properly
resubmitted.

In the loop scanning other inodes being completed, it should check the
current item for the XFS_LI_FAILED, and not the initial one.

The state of the initial inode is checked after the loop ends

Kudos to Eric for catching this.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_inode_item.c

index 6d0f74ec31e89c35769b55f3402003c2548ae980..a705f34b58fad089659a019dcdd1caecffd01aa3 100644 (file)
@@ -745,7 +745,7 @@ xfs_iflush_done(
                 */
                iip = INODE_ITEM(blip);
                if ((iip->ili_logged && blip->li_lsn == iip->ili_flush_lsn) ||
-                   lip->li_flags & XFS_LI_FAILED)
+                   (blip->li_flags & XFS_LI_FAILED))
                        need_ail++;
 
                blip = next;