summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_ag.c
diff options
context:
space:
mode:
authorEric Sandeen <esandeen@redhat.com>2021-11-09 18:18:50 -0800
committerDarrick J. Wong <djwong@kernel.org>2021-11-10 09:37:38 -0800
commit29f11fce211c7fcf32713457c031e71785fb6088 (patch)
treeb9f7a1abbaa086d9efdbacbc4c9c6c6d2b7786e5 /fs/xfs/libxfs/xfs_ag.c
parent5b068aadf62da006891383f6b23e47bc3ad49995 (diff)
downloadlwn-29f11fce211c7fcf32713457c031e71785fb6088.tar.gz
lwn-29f11fce211c7fcf32713457c031e71785fb6088.zip
xfs: #ifdef out perag code for userspace
The xfs_perag structure and initialization is unused in userspace, so #ifdef it out with __KERNEL__ to facilitate the xfsprogs sync and build. Signed-off-by: Eric Sandeen <esandeen@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ag.c')
-rw-r--r--fs/xfs/libxfs/xfs_ag.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
index d7d875cef07a..1e4ee042d52f 100644
--- a/fs/xfs/libxfs/xfs_ag.c
+++ b/fs/xfs/libxfs/xfs_ag.c
@@ -248,6 +248,7 @@ xfs_initialize_perag(
spin_unlock(&mp->m_perag_lock);
radix_tree_preload_end();
+#ifdef __KERNEL__
/* Place kernel structure only init below this point. */
spin_lock_init(&pag->pag_ici_lock);
spin_lock_init(&pag->pagb_lock);
@@ -257,6 +258,7 @@ xfs_initialize_perag(
init_waitqueue_head(&pag->pagb_wait);
pag->pagb_count = 0;
pag->pagb_tree = RB_ROOT;
+#endif /* __KERNEL__ */
error = xfs_buf_hash_init(pag);
if (error)