xfs: use bool for done in xfs_inode_ag_walk
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 21 May 2020 20:08:49 +0000 (13:08 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 27 May 2020 15:49:27 +0000 (08:49 -0700)
This is a boolean variable, so use the bool type.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_icache.c

index 0f2edda5b08d6ea6e1c4b66f460db26efd07ca3b..0adc6cc0b37e2063f3ec44299925ffdcdd78f82b 100644 (file)
@@ -823,11 +823,11 @@ xfs_inode_ag_walk(
        uint32_t                first_index;
        int                     last_error = 0;
        int                     skipped;
-       int                     done;
+       bool                    done;
        int                     nr_found;
 
 restart:
-       done = 0;
+       done = false;
        skipped = 0;
        first_index = 0;
        nr_found = 0;
@@ -879,7 +879,7 @@ restart:
                                continue;
                        first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1);
                        if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino))
-                               done = 1;
+                               done = true;
                }
 
                /* unlock now we've grabbed the inodes. */