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/xfs_filestream.c |
Line in file: | 347 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
|
Entered: | 2012-03-04 17:07:06 UTC |
317 318 item->ag = ag; 319 item->ip = ip; 320 item->pip = pip; 321 322 err = xfs_mru_cache_insert(cache, ip->i_ino, item); 323 if (err) { 324 kmem_zone_free(item_zone, item); 325 return err; 326 } 327 328 /* Take a reference on the AG. */ 329 xfs_filestream_get_ag(mp, ag); 330 331 /* 332 * Take a reference on the inode itself regardless of whether it's a 333 * regular file or a directory. 334 */ 335 IHOLD(ip); 336 337 /* 338 * In the case of a regular file, take a reference on the parent inode 339 * as well to ensure it remains in-core. 340 */ 341 if (pip) 342 IHOLD(pip); 343 344 TRACE_UPDATE(mp, ip, ag, xfs_filestream_peek_ag(mp, ag), 345 ag, xfs_filestream_peek_ag(mp, ag)); 346 347 return 0; 348} 349 350/* xfs_fstrm_free_func(): callback for freeing cached stream items. */ 351STATIC void 352xfs_fstrm_free_func( 353 unsigned long ino, 354 void *data) 355{ 356 fstrm_item_t *item = (fstrm_item_t *)data; 357 xfs_inode_t *ip = item->ip;