xfs: convert noroom, okalloc in xfs_dialloc() to bool
authorGao Xiang <hsiangkao@redhat.com>
Wed, 9 Dec 2020 18:02:05 +0000 (10:02 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 12 Dec 2020 18:48:24 +0000 (10:48 -0800)
Boolean is preferred for such use.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_ialloc.c

index 974e71b..45cf7e5 100644 (file)
@@ -1716,11 +1716,11 @@ xfs_dialloc(
        xfs_agnumber_t          agno;
        int                     error;
        int                     ialloced;
-       int                     noroom = 0;
+       bool                    noroom = false;
        xfs_agnumber_t          start_agno;
        struct xfs_perag        *pag;
        struct xfs_ino_geometry *igeo = M_IGEO(mp);
-       int                     okalloc = 1;
+       bool                    okalloc = true;
 
        if (*IO_agbp) {
                /*
@@ -1753,8 +1753,8 @@ xfs_dialloc(
        if (igeo->maxicount &&
            percpu_counter_read_positive(&mp->m_icount) + igeo->ialloc_inos
                                                        > igeo->maxicount) {
-               noroom = 1;
-               okalloc = 0;
+               noroom = true;
+               okalloc = false;
        }
 
        /*