Showing error 949

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/ocfs2/localalloc.c
Line in file: 728
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

 698                     (unsigned long long)ac->ac_max_block);
 699
 700        if (!ocfs2_local_alloc_in_range(local_alloc_inode, ac,
 701                                        bits_wanted)) {
 702                /*
 703                 * The window is outside ac->ac_max_block.
 704                 * This errno tells the caller to keep localalloc enabled
 705                 * but to get the allocation from the main bitmap.
 706                 */
 707                status = -EFBIG;
 708                goto bail;
 709        }
 710
 711        ac->ac_inode = local_alloc_inode;
 712        /* We should never use localalloc from another slot */
 713        ac->ac_alloc_slot = osb->slot_num;
 714        ac->ac_which = OCFS2_AC_USE_LOCAL;
 715        get_bh(osb->local_alloc_bh);
 716        ac->ac_bh = osb->local_alloc_bh;
 717        status = 0;
 718bail:
 719        if (status < 0 && local_alloc_inode) {
 720                mutex_unlock(&local_alloc_inode->i_mutex);
 721                iput(local_alloc_inode);
 722        }
 723
 724        mlog(0, "bits=%d, slot=%d, ret=%d\n", bits_wanted, osb->slot_num,
 725             status);
 726
 727        mlog_exit(status);
 728        return status;
 729}
 730
 731int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
 732                                 handle_t *handle,
 733                                 struct ocfs2_alloc_context *ac,
 734                                 u32 bits_wanted,
 735                                 u32 *bit_off,
 736                                 u32 *num_bits)
 737{
 738        int status, start;
Show full sources