diff options
author | Felix Blyakher <felixb@sgi.com> | 2009-06-01 14:13:24 -0400 |
---|---|---|
committer | Felix Blyakher <felixb@sgi.com> | 2009-06-01 14:13:24 -0400 |
commit | 4156e735d3abde8e9243b5d22f7999dd3fffab2e (patch) | |
tree | d69552f9eafbe62715366d7c9617259e7eeff672 /fs/xfs | |
parent | 096324873f9c7172a17aff9db1356f4f01b77afe (diff) |
xfs: prevent deadlock in xfs_qm_shake()
It's possible to recurse into filesystem from the memory
allocation, which deadlocks in xfs_qm_shake(). Add check
for __GFP_FS, and bail out if it is not set.
Signed-off-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Hedi Berriche <hedi@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/kmem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h index af6843c7ee4b..179cbd630f69 100644 --- a/fs/xfs/linux-2.6/kmem.h +++ b/fs/xfs/linux-2.6/kmem.h | |||
@@ -103,7 +103,7 @@ extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast); | |||
103 | static inline int | 103 | static inline int |
104 | kmem_shake_allow(gfp_t gfp_mask) | 104 | kmem_shake_allow(gfp_t gfp_mask) |
105 | { | 105 | { |
106 | return (gfp_mask & __GFP_WAIT) != 0; | 106 | return ((gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS)); |
107 | } | 107 | } |
108 | 108 | ||
109 | #endif /* __XFS_SUPPORT_KMEM_H__ */ | 109 | #endif /* __XFS_SUPPORT_KMEM_H__ */ |