From: Gao Xiang Date: Thu, 7 Jan 2021 20:59:17 +0000 (-0500) Subject: xfs: convert noroom, okalloc in xfs_dialloc() to bool X-Git-Tag: v5.11.0-rc0~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e8b0988898cee3ff7ed6537b0fb45f45246930e;p=thirdparty%2Fxfsprogs-dev.git xfs: convert noroom, okalloc in xfs_dialloc() to bool Source kernel commit: 15574ebbff260a70d344cfb924a8daf3c47dc303 Boolean is preferred for such use. Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c index d78f960c6..6b13f91dc 100644 --- a/libxfs/xfs_ialloc.c +++ b/libxfs/xfs_ialloc.c @@ -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; } /*