diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-05-26 21:58:13 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-05-28 16:19:50 -0400 |
commit | 9b98b6f3e1534bba2efcd5b16318945cf2218d99 (patch) | |
tree | 1b793a3632ec68c2f8a2f24f200325f2235dd1b8 | |
parent | 38e712ab3d28d79725eaade02fe8aba51abac196 (diff) |
xfs: fix might_sleep() warning when initialising per-ag tree
The use of radix_tree_preload() only works if the radix tree was
initialised without the __GFP_WAIT flag. The per-ag tree uses
GFP_NOFS, so does not trigger allocation of new tree nodes from the
preloaded array. Hence it enters the allocator with a spinlock held
and triggers the might_sleep() warnings.
Reported-by; Chris Mason <chris.mason@oracle.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
-rw-r--r-- | fs/xfs/xfs_mount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 2d811e57b332..ef1233b09683 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -1254,7 +1254,7 @@ xfs_mountfs( | |||
1254 | * Allocate and initialize the per-ag data. | 1254 | * Allocate and initialize the per-ag data. |
1255 | */ | 1255 | */ |
1256 | spin_lock_init(&mp->m_perag_lock); | 1256 | spin_lock_init(&mp->m_perag_lock); |
1257 | INIT_RADIX_TREE(&mp->m_perag_tree, GFP_NOFS); | 1257 | INIT_RADIX_TREE(&mp->m_perag_tree, GFP_ATOMIC); |
1258 | error = xfs_initialize_perag(mp, sbp->sb_agcount, &mp->m_maxagi); | 1258 | error = xfs_initialize_perag(mp, sbp->sb_agcount, &mp->m_maxagi); |
1259 | if (error) { | 1259 | if (error) { |
1260 | cmn_err(CE_WARN, "XFS: Failed per-ag init: %d", error); | 1260 | cmn_err(CE_WARN, "XFS: Failed per-ag init: %d", error); |