Skip to content

Commit

Permalink
[GFS2] Get superblock a different way
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Whitehouse committed Oct 10, 2007
1 parent 891ba6d commit 5a60c53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/gfs2/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5a60c53

Please sign in to comment.