From 7ccd7a00ce4244baaf8bab1b2cb127ff415f08fd Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 18 Jan 2006 11:32:00 +0000 Subject: [PATCH] --- yaml --- r: 38587 b: refs/heads/master c: 586dfdaaf328d79bb356d760db963b03a75a4131 h: refs/heads/master i: 38585: 1476d408d75228e9f3f4ae727d5f7abe5a6a1bca 38583: 0be5bd4bd50f96ce7fd4091a2d346bca9d2742cf v: v3 --- [refs] | 2 +- trunk/fs/gfs2/meta_io.c | 11 +++++++---- trunk/fs/gfs2/meta_io.h | 2 +- trunk/fs/gfs2/trans.c | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 99de5cd6bd82..ee2d32a4fcf9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d4e9c4c3bf861ef2ac96e0de659c75a00da92b28 +refs/heads/master: 586dfdaaf328d79bb356d760db963b03a75a4131 diff --git a/trunk/fs/gfs2/meta_io.c b/trunk/fs/gfs2/meta_io.c index 8bbe11855223..134f31efe515 100644 --- a/trunk/fs/gfs2/meta_io.c +++ b/trunk/fs/gfs2/meta_io.c @@ -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); diff --git a/trunk/fs/gfs2/meta_io.h b/trunk/fs/gfs2/meta_io.h index 5556df8cc6c9..10fbf825c110 100644 --- a/trunk/fs/gfs2/meta_io.h +++ b/trunk/fs/gfs2/meta_io.h @@ -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); diff --git a/trunk/fs/gfs2/trans.c b/trunk/fs/gfs2/trans.c index 82952fb64830..a9df4a34ebad 100644 --- a/trunk/fs/gfs2/trans.c +++ b/trunk/fs/gfs2/trans.c @@ -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); }