[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>
This commit is contained in:

committed by
Steven Whitehouse

parent
773adff8e9
commit
16c5f06f15
@@ -210,7 +210,7 @@ int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector)
|
||||
struct page *page;
|
||||
struct bio *bio;
|
||||
|
||||
page = alloc_page(GFP_KERNEL);
|
||||
page = alloc_page(GFP_NOFS);
|
||||
if (unlikely(!page))
|
||||
return -ENOBUFS;
|
||||
|
||||
@@ -218,7 +218,7 @@ int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector)
|
||||
ClearPageDirty(page);
|
||||
lock_page(page);
|
||||
|
||||
bio = bio_alloc(GFP_KERNEL, 1);
|
||||
bio = bio_alloc(GFP_NOFS, 1);
|
||||
if (unlikely(!bio)) {
|
||||
__free_page(page);
|
||||
return -ENOBUFS;
|
||||
|
Reference in New Issue
Block a user