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/dcache.c |
Line in file: | 259 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
|
Entered: | 2012-03-04 17:07:06 UTC |
229 spin_unlock(&dcache_lock); 230 return; 231 } 232 233 /* 234 * AV: ->d_delete() is _NOT_ allowed to block now. 235 */ 236 if (dentry->d_op && dentry->d_op->d_delete) { 237 if (dentry->d_op->d_delete(dentry)) 238 goto unhash_it; 239 } 240 /* Unreachable? Get rid of it */ 241 if (d_unhashed(dentry)) 242 goto kill_it; 243 if (list_empty(&dentry->d_lru)) { 244 dentry->d_flags |= DCACHE_REFERENCED; 245 dentry_lru_add(dentry); 246 } 247 spin_unlock(&dentry->d_lock); 248 spin_unlock(&dcache_lock); 249 return; 250 251unhash_it: 252 __d_drop(dentry); 253kill_it: 254 /* if dentry was on the d_lru list delete it from there */ 255 dentry_lru_del(dentry); 256 dentry = d_kill(dentry); 257 if (dentry) 258 goto repeat; 259} 260 261/** 262 * d_invalidate - invalidate a dentry 263 * @dentry: dentry to invalidate 264 * 265 * Try to invalidate the dentry if it turns out to be 266 * possible. If there are other dentries that can be 267 * reached through this one we can't delete it and we 268 * return -EBUSY. On success we return 0. 269 *