From bb3b0e3df5420fdf2c6bbb4417525c6d2ef55bbb Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Thu, 16 Aug 2007 16:03:57 +0100 Subject: [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 Cc: Bob Peterson --- fs/gfs2/log.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fs/gfs2/log.c') diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 00ab6c070a15..d0e6b42c86e1 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); } } -- cgit v1.2.3