public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] xfs: convert noroom, okalloc in xfs_dialloc() to bool
@ 2020-11-24 15:51 Gao Xiang
  2020-11-24 15:51 ` [PATCH 2/3] xfs: kill ialloced in xfs_dialloc() Gao Xiang
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Gao Xiang @ 2020-11-24 15:51 UTC (permalink / raw)
  To: linux-xfs; +Cc: Gao Xiang

Boolean is preferred for such use.

Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
---
 fs/xfs/libxfs/xfs_ialloc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index 974e71bc4a3a..45cf7e55f5ee 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -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;
 	}
 
 	/*
-- 
2.18.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-12-02  0:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-24 15:51 [PATCH 1/3] xfs: convert noroom, okalloc in xfs_dialloc() to bool Gao Xiang
2020-11-24 15:51 ` [PATCH 2/3] xfs: kill ialloced in xfs_dialloc() Gao Xiang
2020-12-01 10:21   ` Christoph Hellwig
2020-12-01 11:55     ` Gao Xiang
2020-12-01 16:55     ` Darrick J. Wong
2020-12-01 23:50       ` Gao Xiang
2020-12-01 17:04   ` Darrick J. Wong
2020-12-01 23:59     ` Gao Xiang
2020-11-24 15:51 ` [PATCH 3/3] xfs: clean up xfs_dialloc() by introducing __xfs_dialloc() Gao Xiang
2020-11-24 22:16   ` Dave Chinner
2020-11-24 23:14     ` Gao Xiang
2020-12-01 10:19 ` [PATCH 1/3] xfs: convert noroom, okalloc in xfs_dialloc() to bool Christoph Hellwig
2020-12-01 16:56 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox