[GFS2] Remove gfs2_databuf in favour of gfs2_bufdata structure
[firefly-linux-kernel-4.4.55.git] / fs / gfs2 / ops_address.c
index 0aa5f140ddb12d3136c161b93dc98daa20066317..db66d3287550466ce7d68b067062a81fbc1e22a0 100644 (file)
@@ -368,7 +368,7 @@ static int gfs2_commit_write(struct file *file, struct page *page,
                if (error)
                        goto fail;
 
-               gfs2_trans_add_bh(ip->i_gl, dibh);
+               gfs2_trans_add_bh(ip->i_gl, dibh, 1);
 
                kaddr = kmap(page);
                memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from,
@@ -429,13 +429,13 @@ static sector_t gfs2_bmap(struct address_space *mapping, sector_t lblock)
 
 static void discard_buffer(struct gfs2_sbd *sdp, struct buffer_head *bh)
 {
-       struct gfs2_databuf *db;
+       struct gfs2_bufdata *bd;
 
        gfs2_log_lock(sdp);
-       db = get_v2db(bh);
-       if (db) {
-               db->db_bh = NULL;
-               set_v2db(bh, NULL);
+       bd = get_v2bd(bh);
+       if (bd) {
+               bd->bd_bh = NULL;
+               set_v2bd(bh, NULL);
                gfs2_log_unlock(sdp);
                brelse(bh);
        } else