]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: convert noroom, okalloc in xfs_dialloc() to bool
authorGao Xiang <hsiangkao@redhat.com>
Thu, 7 Jan 2021 20:59:17 +0000 (15:59 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 7 Jan 2021 20:59:17 +0000 (15:59 -0500)
Source kernel commit: 15574ebbff260a70d344cfb924a8daf3c47dc303

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_ialloc.c

index d78f960c6d441e1189380810abd748ba45f6152c..6b13f91dc30b0f31bf0ddb14c7ad69fd82ba8b24 100644 (file)
@@ -1711,11 +1711,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) {
                /*
@@ -1748,8 +1748,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;
        }
 
        /*