.. | .. |
---|
1318 | 1318 | |
---|
1319 | 1319 | error = xfs_iwalk_threaded(mp, 0, 0, xfs_qm_dqusage_adjust, 0, true, |
---|
1320 | 1320 | NULL); |
---|
1321 | | - if (error) |
---|
| 1321 | + if (error) { |
---|
| 1322 | + /* |
---|
| 1323 | + * The inode walk may have partially populated the dquot |
---|
| 1324 | + * caches. We must purge them before disabling quota and |
---|
| 1325 | + * tearing down the quotainfo, or else the dquots will leak. |
---|
| 1326 | + */ |
---|
| 1327 | + xfs_qm_dqpurge_all(mp, XFS_QMOPT_QUOTALL); |
---|
1322 | 1328 | goto error_return; |
---|
| 1329 | + } |
---|
1323 | 1330 | |
---|
1324 | 1331 | /* |
---|
1325 | 1332 | * We've made all the changes that we need to make incore. Flush them |
---|