xfs: removed unused error variable from xchk_refcountbt_rec
authorAliasgar Surti <aliasgar.surti500@gmail.com>
Mon, 30 Sep 2019 18:31:48 +0000 (11:31 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sun, 6 Oct 2019 22:39:05 +0000 (15:39 -0700)
Removed unused error variable. Instead of using error variable,
returned the value directly as it wasn't updated.

Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/scrub/refcount.c

index 93b3793bc5b31a91dc466dc0a904a71c549e8dd0..0cab11a5d39070aab46887cff8a4069a921f3eac 100644 (file)
@@ -341,7 +341,6 @@ xchk_refcountbt_rec(
        xfs_extlen_t            len;
        xfs_nlink_t             refcount;
        bool                    has_cowflag;
-       int                     error = 0;
 
        bno = be32_to_cpu(rec->refc.rc_startblock);
        len = be32_to_cpu(rec->refc.rc_blockcount);
@@ -366,7 +365,7 @@ xchk_refcountbt_rec(
 
        xchk_refcountbt_xref(bs->sc, bno, len, refcount);
 
-       return error;
+       return 0;
 }
 
 /* Make sure we have as many refc blocks as the rmap says. */