]> Pileus Git - ~andy/linux/commitdiff
[GFS2] Make the new argument to gfs2_trans_add_bh() actually do something
authorSteven Whitehouse <steve@chygwyn.com>
Wed, 18 Jan 2006 11:32:00 +0000 (11:32 +0000)
committerSteven Whitehouse <steve@chygwyn.com>
Wed, 18 Jan 2006 11:32:00 +0000 (11:32 +0000)
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>
fs/gfs2/meta_io.c
fs/gfs2/meta_io.h
fs/gfs2/trans.c

index 8bbe118552237084a202d6d97295ca05d9b3679f..134f31efe515a6448edf56092f430154e3ba00ca 100644 (file)
@@ -537,13 +537,13 @@ int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags)
 }
 
 /**
- * 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 @@ void gfs2_meta_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh)
        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);
 
index 5556df8cc6c9c40022a90e44fea1181ab92470c3..10fbf825c110a4b7a59f705f70ba99c41e856678 100644 (file)
@@ -64,7 +64,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, uint64_t blkno,
                   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);
index 82952fb64830bc9c0c9b0b8fa30205e263e2d22e..a9df4a34ebad5fbe4246c7da4d6e2048b613e0ca 100644 (file)
@@ -151,7 +151,7 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
        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);
        }