Skip to content

Commit

Permalink
xfs: convert noroom, okalloc in xfs_dialloc() to bool
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gao Xiang authored and Darrick J. Wong committed Dec 12, 2020
1 parent 207ddc0 commit 15574eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/xfs/libxfs/xfs_ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
/*
Expand Down Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 15574eb

Please sign in to comment.