Skip to contentSkip to conversation

ocfs2-unlock-rw-lock-if-inode-lock-failed.patch removed from -mm tree

merged [email protected] 1 participant 1 message May 28, 2013 OCFS2

lore
Share & tools
lore
#0 lore raw

Subject: [merged] ocfs2-unlock-rw-lock-if-inode-lock-failed.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 28 May 2013 12:36:43 -0700

The patch titled
Subject: ocfs2: unlock rw lock if inode lock failed
has been removed from the -mm tree. Its filename was
ocfs2-unlock-rw-lock-if-inode-lock-failed.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Joseph Qi <[email protected]>
Subject: ocfs2: unlock rw lock if inode lock failed

In ocfs2_file_aio_write(), it does ocfs2_rw_lock() first and then ocfs2_inode_lock(). But if ocfs2_inode_lock() failed, it goes to out_sems without unlocking rw lock. This will cause a bug in ocfs2_lock_res_free() when testing res->l_ex_holders, which is increased in __ocfs2_cluster_lock() and decreased in __ocfs2_cluster_unlock().

---

 fs/ocfs2/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/file.c renamed from fs/ocfs2/file.c~ocfs2-unlock-rw-lock-if-inode-lock-failed +1 -1
diff -puN fs/ocfs2/file.c~ocfs2-unlock-rw-lock-if-inode-lock-failed fs/ocfs2/file.c
@@ -2288,7 +2288,7 @@ relock:
 		ret = ocfs2_inode_lock(inode, NULL, 1);
 		if (ret < 0) {
 			mlog_errno(ret);
-			goto out_sems;
+			goto out;
 		}
 
 		ocfs2_inode_unlock(inode, 1);

_

Patches currently in -mm which might be from [email protected] are