[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/bmap.c b/fs/gfs2/bmap.c
index bece362..967cbc6 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -124,7 +124,7 @@
/* Set up the pointer to the new block */
- gfs2_trans_add_bh(ip->i_gl, dibh);
+ gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
@@ -223,7 +223,7 @@
block = gfs2_alloc_meta(ip);
bh = gfs2_meta_new(ip->i_gl, block);
- gfs2_trans_add_bh(ip->i_gl, bh);
+ gfs2_trans_add_bh(ip->i_gl, bh, 1);
gfs2_metatype_set(bh,
GFS2_METATYPE_IN,
GFS2_FORMAT_IN);
@@ -236,7 +236,7 @@
/* Set up the new direct pointer and write it out to disk */
- gfs2_trans_add_bh(ip->i_gl, dibh);
+ gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
@@ -382,7 +382,7 @@
else
*block = gfs2_alloc_meta(ip);
- gfs2_trans_add_bh(ip->i_gl, bh);
+ gfs2_trans_add_bh(ip->i_gl, bh, 1);
*ptr = cpu_to_be64(*block);
ip->i_di.di_blocks++;
@@ -490,7 +490,7 @@
if (*new) {
error = gfs2_meta_inode_buffer(ip, &bh);
if (!error) {
- gfs2_trans_add_bh(ip->i_gl, bh);
+ gfs2_trans_add_bh(ip->i_gl, bh, 1);
gfs2_dinode_out(&ip->i_di, bh->b_data);
brelse(bh);
}
@@ -672,8 +672,8 @@
down_write(&ip->i_rw_mutex);
- gfs2_trans_add_bh(ip->i_gl, dibh);
- gfs2_trans_add_bh(ip->i_gl, bh);
+ gfs2_trans_add_bh(ip->i_gl, dibh, 1);
+ gfs2_trans_add_bh(ip->i_gl, bh, 1);
bstart = 0;
blen = 0;
@@ -795,7 +795,7 @@
if (error)
goto out_end_trans;
- 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);
@@ -833,7 +833,7 @@
if (error)
return error;
- gfs2_trans_add_bh(ip->i_gl, bh);
+ gfs2_trans_add_bh(ip->i_gl, bh, 1);
gfs2_buffer_clear_tail(bh, sizeof(struct gfs2_meta_header) + off);
brelse(bh);
@@ -861,7 +861,7 @@
if (gfs2_is_stuffed(ip)) {
ip->i_di.di_size = size;
ip->i_di.di_mtime = 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);
gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + size);
error = 1;
@@ -879,7 +879,7 @@
ip->i_di.di_size = size;
ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds();
ip->i_di.di_flags |= GFS2_DIF_TRUNC_IN_PROG;
- 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);
}
}
@@ -957,7 +957,7 @@
ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds();
ip->i_di.di_flags &= ~GFS2_DIF_TRUNC_IN_PROG;
- 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);