xfs: always grab transaction when scrubbing inode
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 8 Jan 2018 18:49:03 +0000 (10:49 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 8 Jan 2018 18:49:03 +0000 (10:49 -0800)
Always allocate a transaction for inode scrubbing, even if the _iget
fails.  This is something that is nice to have now for consistency with
the other scrubbers but will become critical when we get to online
repair where we'll actually use the transaction + raw buffer read to fix
the verifier errors.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/inode.c

index 2be4b259477aa89d110a2bb8cb0a4f44fb898553..61cd1123bc4aceae50377448338e2a0df0d6c9e3 100644 (file)
@@ -64,7 +64,7 @@ xfs_scrub_setup_inode(
                break;
        case -EFSCORRUPTED:
        case -EFSBADCRC:
-               return 0;
+               return xfs_scrub_trans_alloc(sc->sm, mp, &sc->tp);
        default:
                return error;
        }