Skip to content

Commit 15574eb

Browse files
Gao Xiangdjwong
authored andcommitted
xfs: convert noroom, okalloc in xfs_dialloc() to bool
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>
1 parent 207ddc0 commit 15574eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/xfs/libxfs/xfs_ialloc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,11 +1716,11 @@ xfs_dialloc(
17161716
xfs_agnumber_t agno;
17171717
int error;
17181718
int ialloced;
1719-
int noroom = 0;
1719+
bool noroom = false;
17201720
xfs_agnumber_t start_agno;
17211721
struct xfs_perag *pag;
17221722
struct xfs_ino_geometry *igeo = M_IGEO(mp);
1723-
int okalloc = 1;
1723+
bool okalloc = true;
17241724

17251725
if (*IO_agbp) {
17261726
/*
@@ -1753,8 +1753,8 @@ xfs_dialloc(
17531753
if (igeo->maxicount &&
17541754
percpu_counter_read_positive(&mp->m_icount) + igeo->ialloc_inos
17551755
> igeo->maxicount) {
1756-
noroom = 1;
1757-
okalloc = 0;
1756+
noroom = true;
1757+
okalloc = false;
17581758
}
17591759

17601760
/*

0 commit comments

Comments
 (0)