User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | fs/xfs/quota/xfs_dquot.c |
Line in file: | 1355 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-03-02 21:35:18 UTC |
1325 xfs_dquot_t *dqp; 1326 1327 dqp = qip->qli_dquot; 1328 1329 /* 1330 * We only want to pull the item from the AIL if its 1331 * location in the log has not changed since we started the flush. 1332 * Thus, we only bother if the dquot's lsn has 1333 * not changed. First we check the lsn outside the lock 1334 * since it's cheaper, and then we recheck while 1335 * holding the lock before removing the dquot from the AIL. 1336 */ 1337 if ((qip->qli_item.li_flags & XFS_LI_IN_AIL) && 1338 qip->qli_item.li_lsn == qip->qli_flush_lsn) { 1339 1340 spin_lock(&dqp->q_mount->m_ail_lock); 1341 /* 1342 * xfs_trans_delete_ail() drops the AIL lock. 1343 */ 1344 if (qip->qli_item.li_lsn == qip->qli_flush_lsn) 1345 xfs_trans_delete_ail(dqp->q_mount, 1346 (xfs_log_item_t*)qip); 1347 else 1348 spin_unlock(&dqp->q_mount->m_ail_lock); 1349 } 1350 1351 /* 1352 * Release the dq's flush lock since we're done with it. 1353 */ 1354 xfs_dqfunlock(dqp); 1355} 1356 1357int 1358xfs_qm_dqlock_nowait( 1359 xfs_dquot_t *dqp) 1360{ 1361 return mutex_trylock(&dqp->q_qlock); 1362} 1363 1364void 1365xfs_dqlock(