@@ -810,9 +810,7 @@ STATIC int
810
810
xfs_inode_ag_walk (
811
811
struct xfs_mount * mp ,
812
812
struct xfs_perag * pag ,
813
- int (* execute )(struct xfs_inode * ip , int flags ,
814
- void * args ),
815
- int flags ,
813
+ int (* execute )(struct xfs_inode * ip , void * args ),
816
814
void * args ,
817
815
int tag ,
818
816
int iter_flags )
@@ -888,7 +886,7 @@ xfs_inode_ag_walk(
888
886
if ((iter_flags & XFS_AGITER_INEW_WAIT ) &&
889
887
xfs_iflags_test (batch [i ], XFS_INEW ))
890
888
xfs_inew_wait (batch [i ]);
891
- error = execute (batch [i ], flags , args );
889
+ error = execute (batch [i ], args );
892
890
xfs_irele (batch [i ]);
893
891
if (error == - EAGAIN ) {
894
892
skipped ++ ;
992
990
xfs_inode_ag_iterator (
993
991
struct xfs_mount * mp ,
994
992
int iter_flags ,
995
- int (* execute )(struct xfs_inode * ip , int flags ,
996
- void * args ),
997
- int flags ,
993
+ int (* execute )(struct xfs_inode * ip , void * args ),
998
994
void * args ,
999
995
int tag )
1000
996
{
@@ -1006,7 +1002,7 @@ xfs_inode_ag_iterator(
1006
1002
ag = 0 ;
1007
1003
while ((pag = xfs_inode_walk_get_perag (mp , ag , tag ))) {
1008
1004
ag = pag -> pag_agno + 1 ;
1009
- error = xfs_inode_ag_walk (mp , pag , execute , flags , args , tag ,
1005
+ error = xfs_inode_ag_walk (mp , pag , execute , args , tag ,
1010
1006
iter_flags );
1011
1007
xfs_perag_put (pag );
1012
1008
if (error ) {
@@ -1463,12 +1459,14 @@ xfs_inode_match_id_union(
1463
1459
STATIC int
1464
1460
xfs_inode_free_eofblocks (
1465
1461
struct xfs_inode * ip ,
1466
- int flags ,
1467
1462
void * args )
1468
1463
{
1469
- int ret = 0 ;
1470
- struct xfs_eofblocks * eofb = args ;
1471
- int match ;
1464
+ struct xfs_eofblocks * eofb = args ;
1465
+ bool wait ;
1466
+ int match ;
1467
+ int ret ;
1468
+
1469
+ wait = eofb && (eofb -> eof_flags & XFS_EOF_FLAGS_SYNC );
1472
1470
1473
1471
if (!xfs_can_free_eofblocks (ip , false)) {
1474
1472
/* inode could be preallocated or append-only */
@@ -1481,8 +1479,7 @@ xfs_inode_free_eofblocks(
1481
1479
* If the mapping is dirty the operation can block and wait for some
1482
1480
* time. Unless we are waiting, skip it.
1483
1481
*/
1484
- if (!(flags & SYNC_WAIT ) &&
1485
- mapping_tagged (VFS_I (ip )-> i_mapping , PAGECACHE_TAG_DIRTY ))
1482
+ if (!wait && mapping_tagged (VFS_I (ip )-> i_mapping , PAGECACHE_TAG_DIRTY ))
1486
1483
return 0 ;
1487
1484
1488
1485
if (eofb ) {
@@ -1504,10 +1501,11 @@ xfs_inode_free_eofblocks(
1504
1501
* scanner moving and revisit the inode in a subsequent pass.
1505
1502
*/
1506
1503
if (!xfs_ilock_nowait (ip , XFS_IOLOCK_EXCL )) {
1507
- if (flags & SYNC_WAIT )
1508
- ret = - EAGAIN ;
1509
- return ret ;
1504
+ if (wait )
1505
+ return - EAGAIN ;
1506
+ return 0 ;
1510
1507
}
1508
+
1511
1509
ret = xfs_free_eofblocks (ip );
1512
1510
xfs_iunlock (ip , XFS_IOLOCK_EXCL );
1513
1511
@@ -1518,16 +1516,10 @@ static int
1518
1516
__xfs_icache_free_eofblocks (
1519
1517
struct xfs_mount * mp ,
1520
1518
struct xfs_eofblocks * eofb ,
1521
- int (* execute )(struct xfs_inode * ip , int flags ,
1522
- void * args ),
1519
+ int (* execute )(struct xfs_inode * ip , void * args ),
1523
1520
int tag )
1524
1521
{
1525
- int flags = SYNC_TRYLOCK ;
1526
-
1527
- if (eofb && (eofb -> eof_flags & XFS_EOF_FLAGS_SYNC ))
1528
- flags = SYNC_WAIT ;
1529
-
1530
- return xfs_inode_ag_iterator (mp , 0 , execute , flags , eofb , tag );
1522
+ return xfs_inode_ag_iterator (mp , 0 , execute , eofb , tag );
1531
1523
}
1532
1524
1533
1525
int
@@ -1752,7 +1744,6 @@ xfs_prep_free_cowblocks(
1752
1744
STATIC int
1753
1745
xfs_inode_free_cowblocks (
1754
1746
struct xfs_inode * ip ,
1755
- int flags ,
1756
1747
void * args )
1757
1748
{
1758
1749
struct xfs_eofblocks * eofb = args ;
0 commit comments