1
0
Fork 0

[GFS2] Fix deadlock in memory allocation

We must not call GFP_KERNEL memory allocations while we
are holding the log lock (read or write) since that may
trigger a log flush resulting in a deadlock.

Eventually we need to fix the locking in log.c, for now
this solves the problem at the expense of freeing up memory
as fast as we would like to. This needs to be revisited
later on.

Cc: Kevin Anderson <kanderso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
hifive-unleashed-5.1
Steven Whitehouse 2006-07-11 09:50:54 -04:00
parent 4340fe6253
commit f3bba03fd1
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp)
aspace = new_inode(sdp->sd_vfs);
if (aspace) {
mapping_set_gfp_mask(aspace->i_mapping, GFP_KERNEL);
mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS);
aspace->i_mapping->a_ops = &aspace_aops;
aspace->i_size = ~0ULL;
aspace->u.generic_ip = NULL;