From: Darrick J. Wong Date: Fri, 5 Oct 2018 02:36:11 +0000 (-0500) Subject: xfs: move extent busy tree initialization to xfs_initialize_perag X-Git-Tag: v4.19.0-rc0~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f248827cbfadf1d3c142bb1fb9380c71dce60a0;p=thirdparty%2Fxfsprogs-dev.git xfs: move extent busy tree initialization to xfs_initialize_perag Source kernel commit: ff23f4af7efd86cbb1bda42fe2171e0790f9cb5a Move the per-AG busy extent tree initialization to the per-ag structure initialization since we don't want online repair to leak the old tree. We only deconstruct the tree at unmount time, so this should be safe. This also enables us to eliminate the commented out initialization in the xfsprogs libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index e1b2c0fbf..cbcf2346c 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -2751,10 +2751,6 @@ xfs_alloc_read_agf( pag->pagf_levels[XFS_BTNUM_RMAPi] = be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAPi]); pag->pagf_refcount_level = be32_to_cpu(agf->agf_refcount_level); - spin_lock_init(&pag->pagb_lock); - pag->pagb_count = 0; - /* XXX: pagb_tree doesn't exist in userspace */ - //pag->pagb_tree = RB_ROOT; pag->pagf_init = 1; pag->pagf_agflreset = xfs_agfl_needs_reset(mp, agf); }