From: Dave Kleikamp Date: Wed, 1 May 2013 16:08:38 +0000 (-0500) Subject: jfs: fix a couple races X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~49^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73aaa22d5ffb2630456bac2f9a4ed9b81d0d7271;p=pandora-kernel.git jfs: fix a couple races This patch fixes races uncovered by xfstests testcase 068. One race is the result of jfs_sync() trying to write a sync point to the journal after it has been frozen (or possibly in the process). Since freezing sync's the journal, there is no need to write a sync point so we simply want to return. The second involves jfs_write_inode() being called on a deleted inode. It calls jfs_flush_journal which is held up by the jfs_commit thread doing the final iput on the same deleted inode, which itself is waiting for the I_SYNC flag to be cleared. jfs_write_inode need not do anything when i_nlink is zero, which is the easy fix. Reported-by: Michael L. Semon Signed-off-by: Dave Kleikamp --- Reading git-diff-tree failed