Skip to contentSkip to conversation

ocfs2: unlock inode if deleting inode from orphan fail

PATCH New Joseph Qi 2 participants 2 messages Feb 24, 2016 OCFS2

lore
Share & tools
lore

Joseph Qi

author
#0 lore raw

PATCH 1/1 ocfs2: unlock inode if deleting inode from orphan fail

From: Guozhonghua <[email protected]>

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").

---
 fs/ocfs2/aops.c | 1 +
 1 file changed, 1 insertion(+)
fs/ocfs2/aops.c +1 -0
index 7f60472..e6795c7 100644
@@ -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);
Signature · 1 line
1.8.4.3
#1 lore raw

PATCH 1/1 ocfs2: unlock inode if deleting inode from orphan fail

looks good, thanks.

Quoted 36 lines
Quoted 1 line
Quoted 1 line

From: Guozhonghua <[email protected]>

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").

---
 fs/ocfs2/aops.c | 1 +
 1 file changed, 1 insertion(+)
fs/ocfs2/aops.c +1 -0
index 7f60472..e6795c7 100644
@@ -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);
Signature · 8 lines
1.8.4.3



_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com 
https://oss.oracle.com/mailman/listinfo/ocfs2-devel