/* Place kernel structure only init below this point. */
spin_lock_init(&rtg->rtg_state_lock);
init_waitqueue_head(&rtg->rtg_active_wq);
+ memset(&rtg->lock_class, 0, sizeof(rtg->lock_class));
+ lockdep_register_key(&rtg->lock_class);
#endif /* __KERNEL__ */
/* Active ref owned by mount indicates rtgroup is online. */
spin_unlock(&mp->m_rtgroup_lock);
if (!rtg)
break;
+#ifdef __KERNEL__
+ lockdep_unregister_key(&rtg->lock_class);
+#endif
kfree(rtg);
}
}
spin_unlock(&mp->m_rtgroup_lock);
ASSERT(rtg);
XFS_IS_CORRUPT(mp, atomic_read(&rtg->rtg_ref) != 0);
+#ifdef __KERNEL__
+ lockdep_unregister_key(&rtg->lock_class);
+#endif
/* drop the mount's active reference */
xfs_rtgroup_rele(rtg);