summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_bmap_btree.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-22 23:39:43 +0300
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 23:39:43 +0300
commit42e357c806c8c0ffb9c5c2faa4ad034bfe950d77 (patch)
tree028d2f8ff2b7975e2b931676580e7115db896bbb /fs/xfs/libxfs/xfs_bmap_btree.c
parent579d7022d1afea8f4475d1750224ec0b652febee (diff)
downloadlinux-42e357c806c8c0ffb9c5c2faa4ad034bfe950d77.tar.xz
xfs: make staging file forks explicit
Don't open-code "-1" for whichfork when we're creating a staging btree for a repair; let's define an actual symbol to make grepping and understanding easier. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap_btree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c
index 3b6f14196c8c..7381e507b32b 100644
--- a/fs/xfs/libxfs/xfs_bmap_btree.c
+++ b/fs/xfs/libxfs/xfs_bmap_btree.c
@@ -614,7 +614,7 @@ xfs_bmbt_stage_cursor(
cur = xfs_bmbt_init_common(mp, NULL, ip, XFS_DATA_FORK);
/* Don't let anyone think we're attached to the real fork yet. */
- cur->bc_ino.whichfork = -1;
+ cur->bc_ino.whichfork = XFS_STAGING_FORK;
xfs_btree_stage_ifakeroot(cur, ifake);
return cur;
}