diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2012-12-14 07:36:02 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2013-01-29 05:28:04 -0500 |
commit | 350a9b0a7269c6f4b99eca34d0e773c3c2072520 (patch) | |
tree | 2cb52b2c5a5b5da1a1a07ef50be4bf0598cdb407 /fs/gfs2/trans.c | |
parent | 75f2b879aeb3158daf6aa95d135803f7e71df06b (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.c | 12 |
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) | |||
150 | * | 150 | * |
151 | */ | 151 | */ |
152 | 152 | ||
153 | void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta) | 153 | static void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta) |
154 | { | 154 | { |
155 | struct gfs2_sbd *sdp = gl->gl_sbd; | 155 | struct gfs2_sbd *sdp = gl->gl_sbd; |
156 | struct gfs2_bufdata *bd; | 156 | struct gfs2_bufdata *bd; |
@@ -173,6 +173,16 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta) | |||
173 | unlock_buffer(bh); | 173 | unlock_buffer(bh); |
174 | } | 174 | } |
175 | 175 | ||
176 | void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) | ||
177 | { | ||
178 | return gfs2_trans_add_bh(gl, bh, 0); | ||
179 | } | ||
180 | |||
181 | void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh) | ||
182 | { | ||
183 | return gfs2_trans_add_bh(gl, bh, 1); | ||
184 | } | ||
185 | |||
176 | void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) | 186 | void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) |
177 | { | 187 | { |
178 | struct gfs2_glock *gl = bd->bd_gl; | 188 | struct gfs2_glock *gl = bd->bd_gl; |