diff options
author | Josef Bacik <jbacik@redhat.com> | 2008-04-09 09:33:41 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-04-10 04:55:26 -0400 |
commit | 16c5f06f15ad4e5a5d6e90b78ffb1ac14319e445 (patch) | |
tree | 84204e44e0246e9a3f4db23223a5209105fde368 /fs/gfs2/super.c | |
parent | 773adff8e983cba1f5844c3be3be224ca6645f26 (diff) |
[GFS2] fix GFP_KERNEL misuses
There are several places where GFP_KERNEL allocations happen under a glock,
which will result in hangs if we're under memory pressure and go to re-enter the
fs in order to flush stuff out. This patch changes the culprits to GFS_NOFS to
keep this problem from happening. Thank you,
Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 88497b0b7339..7aeacbc65f35 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -210,7 +210,7 @@ int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector) | |||
210 | struct page *page; | 210 | struct page *page; |
211 | struct bio *bio; | 211 | struct bio *bio; |
212 | 212 | ||
213 | page = alloc_page(GFP_KERNEL); | 213 | page = alloc_page(GFP_NOFS); |
214 | if (unlikely(!page)) | 214 | if (unlikely(!page)) |
215 | return -ENOBUFS; | 215 | return -ENOBUFS; |
216 | 216 | ||
@@ -218,7 +218,7 @@ int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector) | |||
218 | ClearPageDirty(page); | 218 | ClearPageDirty(page); |
219 | lock_page(page); | 219 | lock_page(page); |
220 | 220 | ||
221 | bio = bio_alloc(GFP_KERNEL, 1); | 221 | bio = bio_alloc(GFP_NOFS, 1); |
222 | if (unlikely(!bio)) { | 222 | if (unlikely(!bio)) { |
223 | __free_page(page); | 223 | __free_page(page); |
224 | return -ENOBUFS; | 224 | return -ENOBUFS; |