Thread (347 messages) flat view 347 messages, 3 authors, 2016-03-02
STALE3841d REVIEWED: 1 (0M)

1 review trailer.

[PATCH 4.4 080/342] ocfs2: unlock inode if deleting inode from orphan fails

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2016-03-02 01:19:54
Also in: lkml

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Guozhonghua <redacted>

commit a4a8481ff68a8a324a878e281bc37f18665224f7 upstream.

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 <redacted>
Signed-off-by: Joseph Qi <redacted>
Reviewed-by: Gang He <redacted>
Cc: Mark Fasheh <redacted>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ocfs2/aops.c |    1 +
 1 file changed, 1 insertion(+)
--- 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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help