Showing error 1360

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: 497
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 467        }
 468
 469        *alloc_copy = kmalloc(alloc_bh->b_size, GFP_KERNEL);
 470        if (!(*alloc_copy)) {
 471                status = -ENOMEM;
 472                goto bail;
 473        }
 474        memcpy((*alloc_copy), alloc_bh->b_data, alloc_bh->b_size);
 475
 476        alloc = (struct ocfs2_dinode *) alloc_bh->b_data;
 477        ocfs2_clear_local_alloc(alloc);
 478
 479        status = ocfs2_write_block(osb, alloc_bh, inode);
 480        if (status < 0)
 481                mlog_errno(status);
 482
 483bail:
 484        if ((status < 0) && (*alloc_copy)) {
 485                kfree(*alloc_copy);
 486                *alloc_copy = NULL;
 487        }
 488
 489        brelse(alloc_bh);
 490
 491        if (inode) {
 492                mutex_unlock(&inode->i_mutex);
 493                iput(inode);
 494        }
 495
 496        mlog_exit(status);
 497        return status;
 498}
 499
 500/*
 501 * Step 2: By now, we've completed the journal recovery, we've stamped
 502 * a clean local alloc on disk and dropped the node out of the
 503 * recovery map. Dlm locks will no longer stall, so lets clear out the
 504 * main bitmap.
 505 */
 506int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb,
 507                                        struct ocfs2_dinode *alloc)
Show full sources