From: Christoph Hellwig Date: Tue, 24 Feb 2009 13:39:02 +0000 (-0500) Subject: xfs: fix getbmap vs mmap deadlock X-Git-Tag: v2.6.30-rc5~47^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28e211700a81b0a934b6c7a4b8e7dda843634d2f;p=pandora-kernel.git xfs: fix getbmap vs mmap deadlock xfs_getbmap (or rather the formatters called by it) copy out the getbmap structures under the ilock, which can deadlock against mmap. This has been reported via bugzilla a while ago (#717) and has recently also shown up via lockdep. So allocate a temporary buffer to format the kernel getbmap structures into and then copy them out after dropping the locks. A little problem with this is that we limit the number of extents we can copy out by the maximum allocation size, but I see no real way around that. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Felix Blyakher Signed-off-by: Felix Blyakher --- Reading git-diff-tree failed