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: | 683 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
|
Entered: | 2012-03-04 17:07:06 UTC |
653 ag = file->ag; 654 655 /* Look for the file's directory in the cache. */ 656 dir = xfs_mru_cache_lookup(cache, pip->i_ino); 657 if (dir) { 658 ASSERT(pip == dir->ip); 659 660 /* 661 * If the directory has already moved on to a new AG, 662 * use that AG as the new AG for the file. Don't 663 * forget to twiddle the AG refcounts to match the 664 * movement. 665 */ 666 if (dir->ag != file->ag) { 667 xfs_filestream_put_ag(mp, file->ag); 668 xfs_filestream_get_ag(mp, dir->ag); 669 *agp = file->ag = dir->ag; 670 } 671 672 xfs_mru_cache_done(cache); 673 } 674 675 /* 676 * Put the file back in the cache. If this fails, the free 677 * function needs to be called to tidy up in the same way as if 678 * the item had simply expired from the cache. 679 */ 680 err = xfs_mru_cache_insert(cache, ip->i_ino, file); 681 if (err) { 682 xfs_fstrm_free_func(ip->i_ino, file); 683 return err; 684 } 685 686 /* 687 * If the file's AG was moved to the directory's new AG, there's 688 * nothing more to be done. 689 */ 690 if (*agp != NULLAGNUMBER) { 691 TRACE_MOVEAG(mp, ip, pip, 692 ag, xfs_filestream_peek_ag(mp, ag), 693 *agp, xfs_filestream_peek_ag(mp, *agp));