struct gfs2_inode *ip = GFS2_I(mapping->host);
tr->tr_touched = 1;
- if (!list_empty(&bd->bd_list_tr) &&
+ if (list_empty(&bd->bd_list_tr) &&
(ip->i_di.di_flags & GFS2_DIF_JDATA)) {
tr->tr_num_buf++;
list_add(&bd->bd_list_tr, &tr->tr_list_buf);
}
gfs2_trans_add_gl(bd->bd_gl);
gfs2_log_lock(sdp);
- if (!list_empty(&le->le_list)) {
+ if (list_empty(&le->le_list)) {
if (ip->i_di.di_flags & GFS2_DIF_JDATA)
sdp->sd_log_num_jdata++;
sdp->sd_log_num_databuf++;
bd_le.le_list);
list_del(&bd1->bd_le.le_list);
sdp->sd_log_num_databuf--;
-
bh = bd1->bd_bh;
if (bh) {
bh->b_private = NULL;
+ get_bh(bh);
gfs2_log_unlock(sdp);
wait_on_buffer(bh);
brelse(bh);
lops_init_le(&bd->bd_le, &gfs2_buf_lops);
} else {
lops_init_le(&bd->bd_le, &gfs2_databuf_lops);
- get_bh(bh);
}
bh->b_private = bd;
if (bd) {
bd->bd_bh = NULL;
bh->b_private = NULL;
- gfs2_log_unlock(sdp);
- brelse(bh);
- } else
- gfs2_log_unlock(sdp);
+ }
+ gfs2_log_unlock(sdp);
lock_buffer(bh);
clear_buffer_dirty(bh);
static void gfs2_invalidatepage(struct page *page, unsigned long offset)
{
- struct gfs2_sbd *sdp = page->mapping->host->i_sb->s_fs_info;
+ struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host);
struct buffer_head *head, *bh, *next;
unsigned int curr_off = 0;
if (error)
return error;
- memset(buf, 0, sizeof(struct kstatfs));
-
buf->f_type = GFS2_MAGIC;
buf->f_bsize = sdp->sd_sb.sb_bsize;
buf->f_blocks = sc.sc_total;