summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/log.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-08-16 16:03:57 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2007-10-10 08:55:29 +0100
commitbb3b0e3df5420fdf2c6bbb4417525c6d2ef55bbb (patch)
tree6eab0fa06b4dc9f9a8d62cedaa6879327966a20c /fs/gfs2/log.c
parent2d9a4bbf6d28673f4057682cc02d16bf288b4a35 (diff)
[GFS2] Clean up invalidatepage/releasepage
This patch fixes some bugs relating to journaled data files by cleaning up the gfs2_invalidatepage() and gfs2_releasepage() functions. We now never block during gfs2_releasepage(), instead we always either release or refuse to release depending on the status of the buffers. This fixes Red Hat bugzillas #248969 and #252392. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r--fs/gfs2/log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 00ab6c070a1..d0e6b42c86e 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -229,8 +229,10 @@ static void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
list_del(&bd->bd_ail_st_list);
list_del(&bd->bd_ail_gl_list);
atomic_dec(&bd->bd_gl->gl_ail_count);
- bh_ip = GFS2_I(bd->bd_bh->b_page->mapping->host);
- gfs2_meta_cache_flush(bh_ip);
+ if (bd->bd_bh->b_page->mapping) {
+ bh_ip = GFS2_I(bd->bd_bh->b_page->mapping->host);
+ gfs2_meta_cache_flush(bh_ip);
+ }
brelse(bd->bd_bh);
}
}