diff options
-rw-r--r-- | fs/gfs2/meta_io.c | 11 | ||||
-rw-r--r-- | fs/gfs2/meta_io.h | 2 | ||||
-rw-r--r-- | fs/gfs2/trans.c | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 8bbe11855223..134f31efe515 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c | |||
@@ -537,13 +537,13 @@ int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags) | |||
537 | } | 537 | } |
538 | 538 | ||
539 | /** | 539 | /** |
540 | * gfs2_meta_attach_bufdata - attach a struct gfs2_bufdata structure to a buffer | 540 | * gfs2_attach_bufdata - attach a struct gfs2_bufdata structure to a buffer |
541 | * @gl: the glock the buffer belongs to | 541 | * @gl: the glock the buffer belongs to |
542 | * @bh: The buffer to be attached to | 542 | * @bh: The buffer to be attached to |
543 | * | 543 | * @meta: Flag to indicate whether its metadata or not |
544 | */ | 544 | */ |
545 | 545 | ||
546 | void gfs2_meta_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh) | 546 | void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, int meta) |
547 | { | 547 | { |
548 | struct gfs2_bufdata *bd; | 548 | struct gfs2_bufdata *bd; |
549 | 549 | ||
@@ -563,7 +563,10 @@ void gfs2_meta_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh) | |||
563 | bd->bd_gl = gl; | 563 | bd->bd_gl = gl; |
564 | 564 | ||
565 | INIT_LIST_HEAD(&bd->bd_list_tr); | 565 | INIT_LIST_HEAD(&bd->bd_list_tr); |
566 | lops_init_le(&bd->bd_le, &gfs2_buf_lops); | 566 | if (meta) |
567 | lops_init_le(&bd->bd_le, &gfs2_buf_lops); | ||
568 | else | ||
569 | lops_init_le(&bd->bd_le, &gfs2_databuf_lops); | ||
567 | 570 | ||
568 | set_v2bd(bh, bd); | 571 | set_v2bd(bh, bd); |
569 | 572 | ||
diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h index 5556df8cc6c9..10fbf825c110 100644 --- a/fs/gfs2/meta_io.h +++ b/fs/gfs2/meta_io.h | |||
@@ -64,7 +64,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, uint64_t blkno, | |||
64 | int flags, struct buffer_head **bhp); | 64 | int flags, struct buffer_head **bhp); |
65 | int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags); | 65 | int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags); |
66 | 66 | ||
67 | void gfs2_meta_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh); | 67 | void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, int meta); |
68 | void gfs2_meta_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); | 68 | void gfs2_meta_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); |
69 | void gfs2_meta_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, | 69 | void gfs2_meta_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, |
70 | struct gfs2_ail *ai); | 70 | struct gfs2_ail *ai); |
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 82952fb64830..a9df4a34ebad 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c | |||
@@ -151,7 +151,7 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta) | |||
151 | if (bd) | 151 | if (bd) |
152 | gfs2_assert(sdp, bd->bd_gl == gl); | 152 | gfs2_assert(sdp, bd->bd_gl == gl); |
153 | else { | 153 | else { |
154 | gfs2_meta_attach_bufdata(gl, bh); | 154 | gfs2_attach_bufdata(gl, bh, meta); |
155 | bd = get_v2bd(bh); | 155 | bd = get_v2bd(bh); |
156 | } | 156 | } |
157 | 157 | ||