Skip to content

Commit 042f65f

Browse files
committed
xfs: straighten out all the naming around incore inode tree walks
We're not very consistent about function names for the incore inode iteration function. Turn them all into xfs_inode_walk* variants. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent 5662d38 commit 042f65f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

fs/xfs/xfs_icache.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -767,12 +767,12 @@ xfs_icache_inode_is_allocated(
767767
* ignore it.
768768
*/
769769
STATIC bool
770-
xfs_inode_ag_walk_grab(
770+
xfs_inode_walk_ag_grab(
771771
struct xfs_inode *ip,
772772
int flags)
773773
{
774774
struct inode *inode = VFS_I(ip);
775-
bool newinos = !!(flags & XFS_AGITER_INEW_WAIT);
775+
bool newinos = !!(flags & XFS_INODE_WALK_INEW_WAIT);
776776

777777
ASSERT(rcu_read_lock_held());
778778

@@ -816,7 +816,7 @@ xfs_inode_ag_walk_grab(
816816
* inodes with the given radix tree @tag.
817817
*/
818818
STATIC int
819-
xfs_inode_ag_walk(
819+
xfs_inode_walk_ag(
820820
struct xfs_mount *mp,
821821
struct xfs_perag *pag,
822822
int (*execute)(struct xfs_inode *ip, void *args),
@@ -864,7 +864,7 @@ xfs_inode_ag_walk(
864864
for (i = 0; i < nr_found; i++) {
865865
struct xfs_inode *ip = batch[i];
866866

867-
if (done || !xfs_inode_ag_walk_grab(ip, iter_flags))
867+
if (done || !xfs_inode_walk_ag_grab(ip, iter_flags))
868868
batch[i] = NULL;
869869

870870
/*
@@ -892,7 +892,7 @@ xfs_inode_ag_walk(
892892
for (i = 0; i < nr_found; i++) {
893893
if (!batch[i])
894894
continue;
895-
if ((iter_flags & XFS_AGITER_INEW_WAIT) &&
895+
if ((iter_flags & XFS_INODE_WALK_INEW_WAIT) &&
896896
xfs_iflags_test(batch[i], XFS_INEW))
897897
xfs_inew_wait(batch[i]);
898898
error = execute(batch[i], args);
@@ -937,7 +937,7 @@ xfs_inode_walk_get_perag(
937937
* @tag.
938938
*/
939939
int
940-
xfs_inode_ag_iterator(
940+
xfs_inode_walk(
941941
struct xfs_mount *mp,
942942
int iter_flags,
943943
int (*execute)(struct xfs_inode *ip, void *args),
@@ -952,7 +952,7 @@ xfs_inode_ag_iterator(
952952
ag = 0;
953953
while ((pag = xfs_inode_walk_get_perag(mp, ag, tag))) {
954954
ag = pag->pag_agno + 1;
955-
error = xfs_inode_ag_walk(mp, pag, execute, args, tag,
955+
error = xfs_inode_walk_ag(mp, pag, execute, args, tag,
956956
iter_flags);
957957
xfs_perag_put(pag);
958958
if (error) {
@@ -1548,7 +1548,7 @@ xfs_icache_free_eofblocks(
15481548
struct xfs_mount *mp,
15491549
struct xfs_eofblocks *eofb)
15501550
{
1551-
return xfs_inode_ag_iterator(mp, 0, xfs_inode_free_eofblocks, eofb,
1551+
return xfs_inode_walk(mp, 0, xfs_inode_free_eofblocks, eofb,
15521552
XFS_ICI_EOFBLOCKS_TAG);
15531553
}
15541554

@@ -1798,7 +1798,7 @@ xfs_icache_free_cowblocks(
17981798
struct xfs_mount *mp,
17991799
struct xfs_eofblocks *eofb)
18001800
{
1801-
return xfs_inode_ag_iterator(mp, 0, xfs_inode_free_cowblocks, eofb,
1801+
return xfs_inode_walk(mp, 0, xfs_inode_free_cowblocks, eofb,
18021802
XFS_ICI_COWBLOCKS_TAG);
18031803
}
18041804

fs/xfs/xfs_icache.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct xfs_eofblocks {
2424
* tags for inode radix tree
2525
*/
2626
#define XFS_ICI_NO_TAG (-1) /* special flag for an untagged lookup
27-
in xfs_inode_ag_iterator */
27+
in xfs_inode_walk */
2828
#define XFS_ICI_RECLAIM_TAG 0 /* inode is to be reclaimed */
2929
#define XFS_ICI_EOFBLOCKS_TAG 1 /* inode has blocks beyond EOF */
3030
#define XFS_ICI_COWBLOCKS_TAG 2 /* inode can have cow blocks to gc */
@@ -40,7 +40,7 @@ struct xfs_eofblocks {
4040
/*
4141
* flags for AG inode iterator
4242
*/
43-
#define XFS_AGITER_INEW_WAIT 0x1 /* wait on new inodes */
43+
#define XFS_INODE_WALK_INEW_WAIT 0x1 /* wait on new inodes */
4444

4545
int xfs_iget(struct xfs_mount *mp, struct xfs_trans *tp, xfs_ino_t ino,
4646
uint flags, uint lock_flags, xfs_inode_t **ipp);
@@ -71,7 +71,7 @@ int xfs_inode_free_quota_cowblocks(struct xfs_inode *ip);
7171
void xfs_cowblocks_worker(struct work_struct *);
7272
void xfs_queue_cowblocks(struct xfs_mount *);
7373

74-
int xfs_inode_ag_iterator(struct xfs_mount *mp, int iter_flags,
74+
int xfs_inode_walk(struct xfs_mount *mp, int iter_flags,
7575
int (*execute)(struct xfs_inode *ip, void *args),
7676
void *args, int tag);
7777

fs/xfs/xfs_qm_syscalls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,6 @@ xfs_qm_dqrele_all_inodes(
781781
uint flags)
782782
{
783783
ASSERT(mp->m_quotainfo);
784-
xfs_inode_ag_iterator(mp, XFS_AGITER_INEW_WAIT, xfs_dqrele_inode,
784+
xfs_inode_walk(mp, XFS_INODE_WALK_INEW_WAIT, xfs_dqrele_inode,
785785
&flags, XFS_ICI_NO_TAG);
786786
}

0 commit comments

Comments
 (0)