aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorSteven Whitehouse <steve@chygwyn.com>2006-01-18 06:19:28 -0500
committerSteven Whitehouse <steve@chygwyn.com>2006-01-18 06:19:28 -0500
commitd4e9c4c3bf861ef2ac96e0de659c75a00da92b28 (patch)
tree925ececc725ad5180b9253f732b50c51bfa0754d /fs/gfs2/inode.c
parentb96ca4fa4e3b510d528a093a5bac0befbc2ba46d (diff)
[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>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index aa5311ef7ba7..9ed7c0541065 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -691,7 +691,7 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff)
691 ip->i_di.di_nlink = nlink; 691 ip->i_di.di_nlink = nlink;
692 ip->i_di.di_ctime = get_seconds(); 692 ip->i_di.di_ctime = get_seconds();
693 693
694 gfs2_trans_add_bh(ip->i_gl, dibh); 694 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
695 gfs2_dinode_out(&ip->i_di, dibh->b_data); 695 gfs2_dinode_out(&ip->i_di, dibh->b_data);
696 brelse(dibh); 696 brelse(dibh);
697 697
@@ -786,7 +786,7 @@ static int pick_formal_ino_1(struct gfs2_sbd *sdp, uint64_t *formal_ino)
786 if (ir.ir_length) { 786 if (ir.ir_length) {
787 *formal_ino = ir.ir_start++; 787 *formal_ino = ir.ir_start++;
788 ir.ir_length--; 788 ir.ir_length--;
789 gfs2_trans_add_bh(ip->i_gl, bh); 789 gfs2_trans_add_bh(ip->i_gl, bh, 1);
790 gfs2_inum_range_out(&ir, 790 gfs2_inum_range_out(&ir,
791 bh->b_data + sizeof(struct gfs2_dinode)); 791 bh->b_data + sizeof(struct gfs2_dinode));
792 brelse(bh); 792 brelse(bh);
@@ -843,7 +843,7 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino)
843 if (x < y) 843 if (x < y)
844 gfs2_consist_inode(m_ip); 844 gfs2_consist_inode(m_ip);
845 x = cpu_to_be64(x); 845 x = cpu_to_be64(x);
846 gfs2_trans_add_bh(m_ip->i_gl, m_bh); 846 gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1);
847 *(uint64_t *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = x; 847 *(uint64_t *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = x;
848 848
849 brelse(m_bh); 849 brelse(m_bh);
@@ -852,7 +852,7 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino)
852 *formal_ino = ir.ir_start++; 852 *formal_ino = ir.ir_start++;
853 ir.ir_length--; 853 ir.ir_length--;
854 854
855 gfs2_trans_add_bh(ip->i_gl, bh); 855 gfs2_trans_add_bh(ip->i_gl, bh, 1);
856 gfs2_inum_range_out(&ir, bh->b_data + sizeof(struct gfs2_dinode)); 856 gfs2_inum_range_out(&ir, bh->b_data + sizeof(struct gfs2_dinode));
857 857
858 out_brelse: 858 out_brelse:
@@ -997,7 +997,7 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl,
997 struct buffer_head *dibh; 997 struct buffer_head *dibh;
998 998
999 dibh = gfs2_meta_new(gl, inum->no_addr); 999 dibh = gfs2_meta_new(gl, inum->no_addr);
1000 gfs2_trans_add_bh(gl, dibh); 1000 gfs2_trans_add_bh(gl, dibh, 1);
1001 gfs2_metatype_set(dibh, GFS2_METATYPE_DI, GFS2_FORMAT_DI); 1001 gfs2_metatype_set(dibh, GFS2_METATYPE_DI, GFS2_FORMAT_DI);
1002 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); 1002 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
1003 di = (struct gfs2_dinode *)dibh->b_data; 1003 di = (struct gfs2_dinode *)dibh->b_data;
@@ -1135,7 +1135,7 @@ static int link_dinode(struct gfs2_inode *dip, struct qstr *name,
1135 if (error) 1135 if (error)
1136 goto fail_end_trans; 1136 goto fail_end_trans;
1137 ip->i_di.di_nlink = 1; 1137 ip->i_di.di_nlink = 1;
1138 gfs2_trans_add_bh(ip->i_gl, dibh); 1138 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
1139 gfs2_dinode_out(&ip->i_di, dibh->b_data); 1139 gfs2_dinode_out(&ip->i_di, dibh->b_data);
1140 brelse(dibh); 1140 brelse(dibh);
1141 1141
@@ -1601,7 +1601,7 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh)
1601 1601
1602 ip->i_di.di_atime = curtime; 1602 ip->i_di.di_atime = curtime;
1603 1603
1604 gfs2_trans_add_bh(ip->i_gl, dibh); 1604 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
1605 gfs2_dinode_out(&ip->i_di, dibh->b_data); 1605 gfs2_dinode_out(&ip->i_di, dibh->b_data);
1606 brelse(dibh); 1606 brelse(dibh);
1607 1607
@@ -1776,7 +1776,7 @@ __gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr)
1776 gfs2_assert_warn(ip->i_sbd, !error); 1776 gfs2_assert_warn(ip->i_sbd, !error);
1777 gfs2_inode_attr_out(ip); 1777 gfs2_inode_attr_out(ip);
1778 1778
1779 gfs2_trans_add_bh(ip->i_gl, dibh); 1779 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
1780 gfs2_dinode_out(&ip->i_di, dibh->b_data); 1780 gfs2_dinode_out(&ip->i_di, dibh->b_data);
1781 brelse(dibh); 1781 brelse(dibh);
1782 } 1782 }