diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-11 09:50:54 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-11 09:50:54 -0400 |
commit | f3bba03fd16e25a262323293e5a07dea173c89f7 (patch) | |
tree | 1a31ba15db8a4134b1095bac438e02b2203f9cc6 /fs/gfs2 | |
parent | 4340fe62531f7d1dafb6f5359ffe0378bdb0db80 (diff) |
[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>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/meta_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index cad44fd70d67..42dfd32059bc 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c | |||
@@ -75,7 +75,7 @@ struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp) | |||
75 | 75 | ||
76 | aspace = new_inode(sdp->sd_vfs); | 76 | aspace = new_inode(sdp->sd_vfs); |
77 | if (aspace) { | 77 | if (aspace) { |
78 | mapping_set_gfp_mask(aspace->i_mapping, GFP_KERNEL); | 78 | mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS); |
79 | aspace->i_mapping->a_ops = &aspace_aops; | 79 | aspace->i_mapping->a_ops = &aspace_aops; |
80 | aspace->i_size = ~0ULL; | 80 | aspace->i_size = ~0ULL; |
81 | aspace->u.generic_ip = NULL; | 81 | aspace->u.generic_ip = NULL; |