All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: unlock inode if deleting inode from orphan fail
@ 2016-02-24  2:15 Joseph Qi
  2016-02-24  7:47 ` Gang He
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Qi @ 2016-02-24  2:15 UTC (permalink / raw)
  To: ocfs2-devel

From: Guozhonghua <guozhonghua@h3c.com>

When doing append direct io cleanup, if deleting inode fails, it goes
out without unlocking inode, which will cause the inode deadlock.
This issue was introduced by commit cf1776a9e834("ocfs2: fix a tiny
race when truncate dio orohaned entry").

Signed-off-by: Guozhonghua <guozhonghua@h3c.com>
Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: <stable@vger.kernel.org>	[4.2+]
---
 fs/ocfs2/aops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 7f60472..e6795c7 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -956,6 +956,7 @@ clean_orphan:
 		tmp_ret = ocfs2_del_inode_from_orphan(osb, inode, di_bh,
 				update_isize, end);
 		if (tmp_ret < 0) {
+			ocfs2_inode_unlock(inode, 1);
 			ret = tmp_ret;
 			mlog_errno(ret);
 			brelse(di_bh);
-- 
1.8.4.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: unlock inode if deleting inode from orphan fail
  2016-02-24  2:15 [Ocfs2-devel] [PATCH] ocfs2: unlock inode if deleting inode from orphan fail Joseph Qi
@ 2016-02-24  7:47 ` Gang He
  0 siblings, 0 replies; 2+ messages in thread
From: Gang He @ 2016-02-24  7:47 UTC (permalink / raw)
  To: ocfs2-devel

looks good, thanks.

Reviewed-by: Gang He <ghe@suse.com>


>>> 
> From: Guozhonghua <guozhonghua@h3c.com>
> 
> When doing append direct io cleanup, if deleting inode fails, it goes
> out without unlocking inode, which will cause the inode deadlock.
> This issue was introduced by commit cf1776a9e834("ocfs2: fix a tiny
> race when truncate dio orohaned entry").
> 
> Signed-off-by: Guozhonghua <guozhonghua@h3c.com>
> Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
> Cc: <stable@vger.kernel.org>	[4.2+]
> ---
>  fs/ocfs2/aops.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
> index 7f60472..e6795c7 100644
> --- a/fs/ocfs2/aops.c
> +++ b/fs/ocfs2/aops.c
> @@ -956,6 +956,7 @@ clean_orphan:
>  		tmp_ret = ocfs2_del_inode_from_orphan(osb, inode, di_bh,
>  				update_isize, end);
>  		if (tmp_ret < 0) {
> +			ocfs2_inode_unlock(inode, 1);
>  			ret = tmp_ret;
>  			mlog_errno(ret);
>  			brelse(di_bh);
> -- 
> 1.8.4.3
> 
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com 
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-24  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24  2:15 [Ocfs2-devel] [PATCH] ocfs2: unlock inode if deleting inode from orphan fail Joseph Qi
2016-02-24  7:47 ` Gang He

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.