summaryrefslogtreecommitdiff
path: root/fs/gfs2/trans.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2012-12-14 12:36:02 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2013-01-29 10:28:04 +0000
commit350a9b0a7269c6f4b99eca34d0e773c3c2072520 (patch)
tree2cb52b2c5a5b5da1a1a07ef50be4bf0598cdb407 /fs/gfs2/trans.c
parent75f2b879aeb3158daf6aa95d135803f7e71df06b (diff)
GFS2: Split gfs2_trans_add_bh() into two
There is little common content in gfs2_trans_add_bh() between the data and meta classes by the time that the functions which it calls are taken into account. The intent here is to split this into two separate functions. Stage one is to introduce gfs2_trans_add_data() and gfs2_trans_add_meta() and update the callers accordingly. Later patches will then pull in the content of gfs2_trans_add_bh() and its dependent functions in order to clean up the code in this area. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r--fs/gfs2/trans.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 6f3ddbcb5cc9..cb795ac754ea 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -150,7 +150,7 @@ void gfs2_trans_end(struct gfs2_sbd *sdp)
*
*/
-void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
+static void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
{
struct gfs2_sbd *sdp = gl->gl_sbd;
struct gfs2_bufdata *bd;
@@ -173,6 +173,16 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
unlock_buffer(bh);
}
+void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh)
+{
+ return gfs2_trans_add_bh(gl, bh, 0);
+}
+
+void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh)
+{
+ return gfs2_trans_add_bh(gl, bh, 1);
+}
+
void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
{
struct gfs2_glock *gl = bd->bd_gl;