From: Jan Kara Date: Tue, 15 Apr 2008 21:34:43 +0000 (-0700) Subject: vfs: fix possible deadlock in ext2, ext3, ext4 when using xattrs X-Git-Tag: v2.6.25~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=335e92e8a515420bd47a6b0f01cb9a206c0ed6e4;p=pandora-kernel.git vfs: fix possible deadlock in ext2, ext3, ext4 when using xattrs mb_cache_entry_alloc() was allocating cache entries with GFP_KERNEL. But filesystems are calling this function while holding xattr_sem so possible recursion into the fs violates locking ordering of xattr_sem and transaction start / i_mutex for ext2-4. Change mb_cache_entry_alloc() so that filesystems can specify desired gfp mask and use GFP_NOFS from all of them. Signed-off-by: Jan Kara Reported-by: Dave Jones Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed