[GFS2] Make the new argument to gfs2_trans_add_bh() actually do something
Passes the flag through to ensure that the correct log operations are
invoked when the flag is set.
Signed-off-by: Steven Whitehouse: <swhiteho@redhat.com>
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index 8bbe118..134f31e 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -537,13 +537,13 @@
}
/**
- * gfs2_meta_attach_bufdata - attach a struct gfs2_bufdata structure to a buffer
+ * gfs2_attach_bufdata - attach a struct gfs2_bufdata structure to a buffer
* @gl: the glock the buffer belongs to
* @bh: The buffer to be attached to
- *
+ * @meta: Flag to indicate whether its metadata or not
*/
-void gfs2_meta_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh)
+void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
{
struct gfs2_bufdata *bd;
@@ -563,7 +563,10 @@
bd->bd_gl = gl;
INIT_LIST_HEAD(&bd->bd_list_tr);
- lops_init_le(&bd->bd_le, &gfs2_buf_lops);
+ if (meta)
+ lops_init_le(&bd->bd_le, &gfs2_buf_lops);
+ else
+ lops_init_le(&bd->bd_le, &gfs2_databuf_lops);
set_v2bd(bh, bd);
diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h
index 5556df8..10fbf82 100644
--- a/fs/gfs2/meta_io.h
+++ b/fs/gfs2/meta_io.h
@@ -64,7 +64,7 @@
int flags, struct buffer_head **bhp);
int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags);
-void gfs2_meta_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh);
+void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, int meta);
void gfs2_meta_pin(struct gfs2_sbd *sdp, struct buffer_head *bh);
void gfs2_meta_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
struct gfs2_ail *ai);
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 82952fb..a9df4a3 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -151,7 +151,7 @@
if (bd)
gfs2_assert(sdp, bd->bd_gl == gl);
else {
- gfs2_meta_attach_bufdata(gl, bh);
+ gfs2_attach_bufdata(gl, bh, meta);
bd = get_v2bd(bh);
}