@@ -380,7 +380,7 @@ noinline_for_stack bool find_lock_delalloc_range(struct inode *inode,
380380 bool found ;
381381 struct extent_state * cached_state = NULL ;
382382 int ret ;
383- int loops = 0 ;
383+ bool loops = false ;
384384
385385 /* Caller should pass a valid @end to indicate the search range end */
386386 ASSERT (orig_end > orig_start );
@@ -437,7 +437,7 @@ noinline_for_stack bool find_lock_delalloc_range(struct inode *inode,
437437 cached_state = NULL ;
438438 if (!loops ) {
439439 max_bytes = fs_info -> sectorsize ;
440- loops = 1 ;
440+ loops = true ;
441441 goto again ;
442442 } else {
443443 return false;
@@ -2359,13 +2359,13 @@ int btree_writepages(struct address_space *mapping, struct writeback_control *wb
23592359 struct btrfs_eb_write_context ctx = { .wbc = wbc };
23602360 struct btrfs_fs_info * fs_info = inode_to_fs_info (mapping -> host );
23612361 int ret = 0 ;
2362- int done = 0 ;
2362+ bool done = false ;
23632363 int nr_to_write_done = 0 ;
23642364 struct eb_batch batch ;
23652365 unsigned int nr_ebs ;
23662366 unsigned long index ;
23672367 unsigned long end ;
2368- int scanned = 0 ;
2368+ bool scanned = false ;
23692369 xa_mark_t tag ;
23702370
23712371 eb_batch_init (& batch );
@@ -2382,7 +2382,7 @@ int btree_writepages(struct address_space *mapping, struct writeback_control *wb
23822382 index = (wbc -> range_start >> fs_info -> nodesize_bits );
23832383 end = (wbc -> range_end >> fs_info -> nodesize_bits );
23842384
2385- scanned = 1 ;
2385+ scanned = true ;
23862386 }
23872387 if (wbc -> sync_mode == WB_SYNC_ALL )
23882388 tag = PAGECACHE_TAG_TOWRITE ;
@@ -2405,7 +2405,7 @@ int btree_writepages(struct address_space *mapping, struct writeback_control *wb
24052405 ret = 0 ;
24062406
24072407 if (ret ) {
2408- done = 1 ;
2408+ done = true ;
24092409 break ;
24102410 }
24112411 continue ;
@@ -2431,7 +2431,7 @@ int btree_writepages(struct address_space *mapping, struct writeback_control *wb
24312431 * We hit the last page and there is more work to be done: wrap
24322432 * back to the start of the file
24332433 */
2434- scanned = 1 ;
2434+ scanned = true ;
24352435 index = 0 ;
24362436 goto retry ;
24372437 }
@@ -2471,15 +2471,15 @@ static int extent_write_cache_pages(struct address_space *mapping,
24712471 struct writeback_control * wbc = bio_ctrl -> wbc ;
24722472 struct inode * inode = mapping -> host ;
24732473 int ret = 0 ;
2474- int done = 0 ;
2474+ bool done = false ;
24752475 int nr_to_write_done = 0 ;
24762476 struct folio_batch fbatch ;
24772477 unsigned int nr_folios ;
24782478 pgoff_t index ;
24792479 pgoff_t end ; /* Inclusive */
24802480 pgoff_t done_index ;
2481- int range_whole = 0 ;
2482- int scanned = 0 ;
2481+ bool range_whole = false ;
2482+ bool scanned = false ;
24832483 xa_mark_t tag ;
24842484
24852485 /*
@@ -2507,8 +2507,8 @@ static int extent_write_cache_pages(struct address_space *mapping,
25072507 index = wbc -> range_start >> PAGE_SHIFT ;
25082508 end = wbc -> range_end >> PAGE_SHIFT ;
25092509 if (wbc -> range_start == 0 && wbc -> range_end == LLONG_MAX )
2510- range_whole = 1 ;
2511- scanned = 1 ;
2510+ range_whole = true ;
2511+ scanned = true ;
25122512 }
25132513
25142514 /*
@@ -2592,7 +2592,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
25922592
25932593 ret = extent_writepage (folio , bio_ctrl );
25942594 if (ret < 0 ) {
2595- done = 1 ;
2595+ done = true ;
25962596 break ;
25972597 }
25982598
@@ -2612,7 +2612,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
26122612 * We hit the last page and there is more work to be done: wrap
26132613 * back to the start of the file
26142614 */
2615- scanned = 1 ;
2615+ scanned = true ;
26162616 index = 0 ;
26172617
26182618 /*
@@ -3444,7 +3444,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
34443444 struct btrfs_folio_state * prealloc = NULL ;
34453445 u64 lockdep_owner = owner_root ;
34463446 bool page_contig = true;
3447- int uptodate = 1 ;
3447+ bool uptodate = true ;
34483448 int ret ;
34493449
34503450 if (check_eb_alignment (fs_info , start ))
@@ -3558,7 +3558,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
35583558 page_contig = false;
35593559
35603560 if (!btrfs_meta_folio_test_uptodate (folio , eb ))
3561- uptodate = 0 ;
3561+ uptodate = false ;
35623562
35633563 /*
35643564 * We can't unlock the pages just yet since the extent buffer
0 commit comments