On Fri, 26 Sep 2014 17:36:37 +0300 Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > commit: 8a09937cacc099da21313223443237cbc84d5876 [57/427] ocfs2: add orphan recovery types in ocfs2_recover_orphans > > ... > > >> fs/ocfs2/journal.c:2204:9: sparse: context imbalance in 'ocfs2_recover_orphans' - different lock contexts for basic block > this? --- a/fs/ocfs2/journal.c~ocfs2-add-orphan-recovery-types-in-ocfs2_recover_orphans-fix +++ a/fs/ocfs2/journal.c @@ -2160,8 +2160,7 @@ static int ocfs2_recover_orphans(struct ret = ocfs2_inode_lock(inode, &di_bh, 1); if (ret) { mlog_errno(ret); - spin_unlock(&oi->ip_lock); - goto out; + goto out_unlock; } ocfs2_truncate_file(inode, di_bh, i_size_read(inode)); ocfs2_inode_unlock(inode, 1); @@ -2173,14 +2172,13 @@ static int ocfs2_recover_orphans(struct OCFS2_INODE_DEL_FROM_ORPHAN_CREDITS); if (IS_ERR(handle)) { ret = PTR_ERR(handle); - goto out; + goto out_unlock; } ret = ocfs2_del_inode_from_orphan(osb, handle, inode); if (ret) { mlog_errno(ret); ocfs2_commit_trans(osb, handle); - spin_unlock(&oi->ip_lock); - goto out; + goto out_unlock; } ocfs2_commit_trans(osb, handle); } @@ -2200,7 +2198,10 @@ static int ocfs2_recover_orphans(struct inode = iter; } -out: + return ret; + +out_unlock: + spin_unlock(&oi->ip_lock); return ret; } -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>