Subject: [merged] ocfs2-unlock-rw-lock-if-inode-lock-failed.patch removed from -mm tree To: joseph.qi@xxxxxxxxxx,du.duyongfeng@xxxxxxxxxx,jlbec@xxxxxxxxxxxx,lizefan@xxxxxxxxxx,mfasheh@xxxxxxxx,sunil.mushran@xxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx 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 <joseph.qi@xxxxxxxxxx> 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(). Signed-off-by: Joseph Qi <joseph.qi@xxxxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxxx> Cc: Li Zefan <lizefan@xxxxxxxxxx> Cc: "Duyongfeng (B)" <du.duyongfeng@xxxxxxxxxx> Acked-by: Sunil Mushran <sunil.mushran@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ocfs2/file.c~ocfs2-unlock-rw-lock-if-inode-lock-failed fs/ocfs2/file.c --- a/fs/ocfs2/file.c~ocfs2-unlock-rw-lock-if-inode-lock-failed +++ a/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 joseph.qi@xxxxxxxxxx are -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html