From: Christoph Hellwig Date: Mon, 19 Oct 2009 04:03:46 +0000 (+0000) Subject: xfs: fix mmap_sem/iolock inversion in xfs_free_eofblocks X-Git-Tag: v2.6.33-rc1~312^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c56c9631cbe88f08854a56ff9776c1f310916830;p=pandora-kernel.git xfs: fix mmap_sem/iolock inversion in xfs_free_eofblocks When xfs_free_eofblocks is called from ->release the VM might already hold the mmap_sem, but in the write path we take the iolock before taking the mmap_sem in the generic write code. Switch xfs_free_eofblocks to only trylock the iolock if called from ->release and skip trimming the prellocated blocks in that case. We'll still free them later on the final iput. Signed-off-by: Christoph Hellwig Reviewed-by: Alex Elder Signed-off-by: Alex Elder --- Reading git-diff-tree failed