From: Andrew Morton <akpm@linux-foundation.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@01.org, WeiWei Wang <wangww631@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [kbuild] [mmotm:master 57/427] fs/ocfs2/journal.c:2204:9: sparse: context imbalance in 'ocfs2_recover_orphans' - different lock contexts for basic block
Date: Mon, 29 Sep 2014 14:08:34 -0700 [thread overview]
Message-ID: <20140929140834.99ceb99a2bb2e0503e750ea7@linux-foundation.org> (raw)
In-Reply-To: <20140926143636.GA3414@mwanda>
On Fri, 26 Sep 2014 17:36:37 +0300 Dan Carpenter <dan.carpenter@oracle.com> 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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-09-29 21:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 14:36 Dan Carpenter
2014-09-29 21:08 ` Andrew Morton [this message]
2014-09-30 1:46 ` Joseph Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140929140834.99ceb99a2bb2e0503e750ea7@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=hannes@cmpxchg.org \
--cc=kbuild@01.org \
--cc=linux-mm@kvack.org \
--cc=wangww631@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox