[GFS2] Add an additional argument to gfs2_trans_add_bh()
This adds an extra argument to gfs2_trans_add_bh() to indicate whether the
bh being added to the transaction is metadata or data. Its currently unused
since all existing callers set it to 1 (metadata) but following patches will
make use of it.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index aa5311e..9ed7c05 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -691,7 +691,7 @@
ip->i_di.di_nlink = nlink;
ip->i_di.di_ctime = get_seconds();
- gfs2_trans_add_bh(ip->i_gl, dibh);
+ gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(&ip->i_di, dibh->b_data);
brelse(dibh);
@@ -786,7 +786,7 @@
if (ir.ir_length) {
*formal_ino = ir.ir_start++;
ir.ir_length--;
- gfs2_trans_add_bh(ip->i_gl, bh);
+ gfs2_trans_add_bh(ip->i_gl, bh, 1);
gfs2_inum_range_out(&ir,
bh->b_data + sizeof(struct gfs2_dinode));
brelse(bh);
@@ -843,7 +843,7 @@
if (x < y)
gfs2_consist_inode(m_ip);
x = cpu_to_be64(x);
- gfs2_trans_add_bh(m_ip->i_gl, m_bh);
+ gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1);
*(uint64_t *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = x;
brelse(m_bh);
@@ -852,7 +852,7 @@
*formal_ino = ir.ir_start++;
ir.ir_length--;
- gfs2_trans_add_bh(ip->i_gl, bh);
+ gfs2_trans_add_bh(ip->i_gl, bh, 1);
gfs2_inum_range_out(&ir, bh->b_data + sizeof(struct gfs2_dinode));
out_brelse:
@@ -997,7 +997,7 @@
struct buffer_head *dibh;
dibh = gfs2_meta_new(gl, inum->no_addr);
- gfs2_trans_add_bh(gl, dibh);
+ gfs2_trans_add_bh(gl, dibh, 1);
gfs2_metatype_set(dibh, GFS2_METATYPE_DI, GFS2_FORMAT_DI);
gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
di = (struct gfs2_dinode *)dibh->b_data;
@@ -1135,7 +1135,7 @@
if (error)
goto fail_end_trans;
ip->i_di.di_nlink = 1;
- gfs2_trans_add_bh(ip->i_gl, dibh);
+ gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(&ip->i_di, dibh->b_data);
brelse(dibh);
@@ -1601,7 +1601,7 @@
ip->i_di.di_atime = curtime;
- gfs2_trans_add_bh(ip->i_gl, dibh);
+ gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(&ip->i_di, dibh->b_data);
brelse(dibh);
@@ -1776,7 +1776,7 @@
gfs2_assert_warn(ip->i_sbd, !error);
gfs2_inode_attr_out(ip);
- gfs2_trans_add_bh(ip->i_gl, dibh);
+ gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(&ip->i_di, dibh->b_data);
brelse(dibh);
}