From: Dave Chinner Date: Mon, 4 Aug 2014 03:29:32 +0000 (+1000) Subject: xfs: fix swapext ilock deadlock X-Git-Tag: omap-for-v3.17/fixes-against-rc2~83^2^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=812176832169c77b4bacddd01edc3e55340263fd;p=pandora-kernel.git xfs: fix swapext ilock deadlock xfs_swap_extents() holds the ilock over a call to filemap_write_and_wait(), which can then try to write data and take the ilock. That causes a self-deadlock. Fix the deadlock and clean up the code by separating the locking appropriately. Add a lockflags variable to track what locks we are holding as we gain and drop them and cleanup the error handling to always use "out_unlock" with the lockflags variable. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner --- Reading git-diff-tree failed