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_item.c |
Line in file: | 211 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-03-02 21:35:18 UTC |
181 * so, the latest copy _is_ the only one that matters. 182 */ 183 return (lsn); 184} 185 186 187/* 188 * This is called to wait for the given dquot to be unpinned. 189 * Most of these pin/unpin routines are plagiarized from inode code. 190 */ 191void 192xfs_qm_dqunpin_wait( 193 xfs_dquot_t *dqp) 194{ 195 ASSERT(XFS_DQ_IS_LOCKED(dqp)); 196 if (dqp->q_pincount == 0) { 197 return; 198 } 199 200 /* 201 * Give the log a push so we don't wait here too long. 202 */ 203 xfs_log_force(dqp->q_mount, (xfs_lsn_t)0, XFS_LOG_FORCE); 204 spin_lock(&(XFS_DQ_TO_QINF(dqp)->qi_pinlock)); 205 if (dqp->q_pincount == 0) { 206 spin_unlock(&(XFS_DQ_TO_QINF(dqp)->qi_pinlock)); 207 return; 208 } 209 sv_wait(&(dqp->q_pinwait), PINOD, 210 &(XFS_DQ_TO_QINF(dqp)->qi_pinlock), s); 211} 212 213/* 214 * This is called when IOP_TRYLOCK returns XFS_ITEM_PUSHBUF to indicate that 215 * the dquot is locked by us, but the flush lock isn't. So, here we are 216 * going to see if the relevant dquot buffer is incore, waiting on DELWRI. 217 * If so, we want to push it out to help us take this item off the AIL as soon 218 * as possible. 219 * 220 * We must not be holding the AIL lock at this point. Calling incore() to 221 * search the buffer cache can be a time consuming thing, and AIL lock is a