@@ -761,7 +761,12 @@ xfs_icache_inode_is_allocated(
761
761
*/
762
762
#define XFS_LOOKUP_BATCH 32
763
763
764
- STATIC int
764
+ /*
765
+ * Decide if the given @ip is eligible to be a part of the inode walk, and
766
+ * grab it if so. Returns true if it's ready to go or false if we should just
767
+ * ignore it.
768
+ */
769
+ STATIC bool
765
770
xfs_inode_ag_walk_grab (
766
771
struct xfs_inode * ip ,
767
772
int flags )
@@ -792,18 +797,18 @@ xfs_inode_ag_walk_grab(
792
797
793
798
/* nothing to sync during shutdown */
794
799
if (XFS_FORCED_SHUTDOWN (ip -> i_mount ))
795
- return - EFSCORRUPTED ;
800
+ return false ;
796
801
797
802
/* If we can't grab the inode, it must on it's way to reclaim. */
798
803
if (!igrab (inode ))
799
- return - ENOENT ;
804
+ return false ;
800
805
801
806
/* inode is valid */
802
- return 0 ;
807
+ return true ;
803
808
804
809
out_unlock_noent :
805
810
spin_unlock (& ip -> i_flags_lock );
806
- return - ENOENT ;
811
+ return false ;
807
812
}
808
813
809
814
STATIC int
@@ -855,7 +860,7 @@ xfs_inode_ag_walk(
855
860
for (i = 0 ; i < nr_found ; i ++ ) {
856
861
struct xfs_inode * ip = batch [i ];
857
862
858
- if (done || xfs_inode_ag_walk_grab (ip , iter_flags ))
863
+ if (done || ! xfs_inode_ag_walk_grab (ip , iter_flags ))
859
864
batch [i ] = NULL ;
860
865
861
866
/*
@@ -1412,48 +1417,48 @@ xfs_reclaim_inodes_count(
1412
1417
return reclaimable ;
1413
1418
}
1414
1419
1415
- STATIC int
1420
+ STATIC bool
1416
1421
xfs_inode_match_id (
1417
1422
struct xfs_inode * ip ,
1418
1423
struct xfs_eofblocks * eofb )
1419
1424
{
1420
1425
if ((eofb -> eof_flags & XFS_EOF_FLAGS_UID ) &&
1421
1426
!uid_eq (VFS_I (ip )-> i_uid , eofb -> eof_uid ))
1422
- return 0 ;
1427
+ return false ;
1423
1428
1424
1429
if ((eofb -> eof_flags & XFS_EOF_FLAGS_GID ) &&
1425
1430
!gid_eq (VFS_I (ip )-> i_gid , eofb -> eof_gid ))
1426
- return 0 ;
1431
+ return false ;
1427
1432
1428
1433
if ((eofb -> eof_flags & XFS_EOF_FLAGS_PRID ) &&
1429
1434
ip -> i_d .di_projid != eofb -> eof_prid )
1430
- return 0 ;
1435
+ return false ;
1431
1436
1432
- return 1 ;
1437
+ return true ;
1433
1438
}
1434
1439
1435
1440
/*
1436
1441
* A union-based inode filtering algorithm. Process the inode if any of the
1437
1442
* criteria match. This is for global/internal scans only.
1438
1443
*/
1439
- STATIC int
1444
+ STATIC bool
1440
1445
xfs_inode_match_id_union (
1441
1446
struct xfs_inode * ip ,
1442
1447
struct xfs_eofblocks * eofb )
1443
1448
{
1444
1449
if ((eofb -> eof_flags & XFS_EOF_FLAGS_UID ) &&
1445
1450
uid_eq (VFS_I (ip )-> i_uid , eofb -> eof_uid ))
1446
- return 1 ;
1451
+ return true ;
1447
1452
1448
1453
if ((eofb -> eof_flags & XFS_EOF_FLAGS_GID ) &&
1449
1454
gid_eq (VFS_I (ip )-> i_gid , eofb -> eof_gid ))
1450
- return 1 ;
1455
+ return true ;
1451
1456
1452
1457
if ((eofb -> eof_flags & XFS_EOF_FLAGS_PRID ) &&
1453
1458
ip -> i_d .di_projid == eofb -> eof_prid )
1454
- return 1 ;
1459
+ return true ;
1455
1460
1456
- return 0 ;
1461
+ return false ;
1457
1462
}
1458
1463
1459
1464
/*
@@ -1466,7 +1471,7 @@ xfs_inode_matches_eofb(
1466
1471
struct xfs_inode * ip ,
1467
1472
struct xfs_eofblocks * eofb )
1468
1473
{
1469
- int match ;
1474
+ bool match ;
1470
1475
1471
1476
if (!eofb )
1472
1477
return true;
0 commit comments