[GFS2] Get superblock a different way
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 26 Sep 2007 08:39:31 +0000 (09:39 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 10 Oct 2007 07:56:34 +0000 (08:56 +0100)
The mapping may be NULL by the time the I/O has completed, so
we now get the superblock by a different route (via the bd and glock)
to avoid this problem.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Wendy Cheng <wcheng@redhat.com>
fs/gfs2/log.c

index ee70467..7df7024 100644 (file)
@@ -513,7 +513,8 @@ struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp)
 static void gfs2_fake_write_endio(struct buffer_head *bh, int uptodate)
 {
        struct buffer_head *real_bh = bh->b_private;
-       struct gfs2_sbd *sdp = GFS2_SB(real_bh->b_page->mapping->host);
+       struct gfs2_bufdata *bd = real_bh->b_private;
+       struct gfs2_sbd *sdp = bd->bd_gl->gl_sbd;
 
        end_buffer_write_sync(bh, uptodate);
        free_buffer_head(bh);