@@ -28,6 +28,7 @@
#include "xfile.h"
#include "xfbtree.h"
#include "xfs_btree_mem.h"
+#include "xfs_rtgroup.h"
/*
* Btree magic numbers.
@@ -473,6 +474,9 @@ xfs_btree_del_cursor(
xfs_is_shutdown(cur->bc_mp) || error != 0);
if (unlikely(cur->bc_flags & XFS_BTREE_STAGING))
kmem_free(cur->bc_ops);
+ if ((cur->bc_flags & XFS_BTREE_ROOT_IN_INODE) &&
+ !(cur->bc_flags & XFS_BTREE_IN_XFILE) && cur->bc_ino.rtg)
+ xfs_rtgroup_put(cur->bc_ino.rtg);
if (!(cur->bc_flags & XFS_BTREE_LONG_PTRS) &&
!(cur->bc_flags & XFS_BTREE_IN_XFILE) && cur->bc_ag.pag)
xfs_perag_put(cur->bc_ag.pag);
@@ -12,6 +12,7 @@ struct xfs_mount;
struct xfs_trans;
struct xfs_ifork;
struct xfs_perag;
+struct xfs_rtgroup;
/*
* Generic key, ptr and record wrapper structures.
@@ -247,6 +248,7 @@ struct xfs_btree_cur_ag {
/* Btree-in-inode cursor information */
struct xfs_btree_cur_ino {
struct xfs_inode *ip;
+ struct xfs_rtgroup *rtg; /* if realtime metadata */
struct xbtree_ifakeroot *ifake; /* for staging cursor */
int allocated;
short forksize;