4040STATIC int xfs_qm_init_quotainos (struct xfs_mount * mp );
4141STATIC int xfs_qm_init_quotainfo (struct xfs_mount * mp );
4242
43- STATIC void xfs_qm_destroy_quotainos (struct xfs_quotainfo * qi );
4443STATIC void xfs_qm_dqfree_one (struct xfs_dquot * dqp );
4544/*
4645 * We use the batch lookup interface to iterate over the dquots as it
@@ -226,6 +225,24 @@ xfs_qm_unmount_rt(
226225 xfs_rtgroup_rele (rtg );
227226}
228227
228+ STATIC void
229+ xfs_qm_destroy_quotainos (
230+ struct xfs_quotainfo * qi )
231+ {
232+ if (qi -> qi_uquotaip ) {
233+ xfs_irele (qi -> qi_uquotaip );
234+ qi -> qi_uquotaip = NULL ; /* paranoia */
235+ }
236+ if (qi -> qi_gquotaip ) {
237+ xfs_irele (qi -> qi_gquotaip );
238+ qi -> qi_gquotaip = NULL ;
239+ }
240+ if (qi -> qi_pquotaip ) {
241+ xfs_irele (qi -> qi_pquotaip );
242+ qi -> qi_pquotaip = NULL ;
243+ }
244+ }
245+
229246/*
230247 * Called from the vfsops layer.
231248 */
@@ -250,20 +267,8 @@ xfs_qm_unmount_quotas(
250267 /*
251268 * Release the quota inodes.
252269 */
253- if (mp -> m_quotainfo ) {
254- if (mp -> m_quotainfo -> qi_uquotaip ) {
255- xfs_irele (mp -> m_quotainfo -> qi_uquotaip );
256- mp -> m_quotainfo -> qi_uquotaip = NULL ;
257- }
258- if (mp -> m_quotainfo -> qi_gquotaip ) {
259- xfs_irele (mp -> m_quotainfo -> qi_gquotaip );
260- mp -> m_quotainfo -> qi_gquotaip = NULL ;
261- }
262- if (mp -> m_quotainfo -> qi_pquotaip ) {
263- xfs_irele (mp -> m_quotainfo -> qi_pquotaip );
264- mp -> m_quotainfo -> qi_pquotaip = NULL ;
265- }
266- }
270+ if (mp -> m_quotainfo )
271+ xfs_qm_destroy_quotainos (mp -> m_quotainfo );
267272}
268273
269274STATIC int
@@ -1712,24 +1717,6 @@ xfs_qm_init_quotainos(
17121717 return error ;
17131718}
17141719
1715- STATIC void
1716- xfs_qm_destroy_quotainos (
1717- struct xfs_quotainfo * qi )
1718- {
1719- if (qi -> qi_uquotaip ) {
1720- xfs_irele (qi -> qi_uquotaip );
1721- qi -> qi_uquotaip = NULL ; /* paranoia */
1722- }
1723- if (qi -> qi_gquotaip ) {
1724- xfs_irele (qi -> qi_gquotaip );
1725- qi -> qi_gquotaip = NULL ;
1726- }
1727- if (qi -> qi_pquotaip ) {
1728- xfs_irele (qi -> qi_pquotaip );
1729- qi -> qi_pquotaip = NULL ;
1730- }
1731- }
1732-
17331720STATIC void
17341721xfs_qm_dqfree_one (
17351722 struct xfs_dquot * dqp )
0 commit comments