aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2018-11-16 15:18:32 -0500
committerAndreas Gruenbacher <agruenba@redhat.com>2018-12-11 15:43:58 -0500
commitcbbe76c8bb27c0bea4bfa6cac56b5d4073b90687 (patch)
treee641346d23405681f95fac0eda8679bd3d549042 /fs/gfs2
parent2a5f14f279f59143139bcd1606903f2f80a34241 (diff)
gfs2: Remove vestigial bd_ops
Field bd_ops was set but never used, so I removed it, and all code supporting it. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Acked-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/incore.h1
-rw-r--r--fs/gfs2/log.c1
-rw-r--r--fs/gfs2/trans.c8
3 files changed, 3 insertions, 7 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 888b62cfd6d1..663759abe60d 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -165,7 +165,6 @@ struct gfs2_bufdata {
165 u64 bd_blkno; 165 u64 bd_blkno;
166 166
167 struct list_head bd_list; 167 struct list_head bd_list;
168 const struct gfs2_log_operations *bd_ops;
169 168
170 struct gfs2_trans *bd_tr; 169 struct gfs2_trans *bd_tr;
171 struct list_head bd_ail_st_list; 170 struct list_head bd_ail_st_list;
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 4dcd2b48189e..5bfaf381921a 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -605,7 +605,6 @@ void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
605 bd->bd_blkno = bh->b_blocknr; 605 bd->bd_blkno = bh->b_blocknr;
606 gfs2_remove_from_ail(bd); /* drops ref on bh */ 606 gfs2_remove_from_ail(bd); /* drops ref on bh */
607 bd->bd_bh = NULL; 607 bd->bd_bh = NULL;
608 bd->bd_ops = &gfs2_revoke_lops;
609 sdp->sd_log_num_revoke++; 608 sdp->sd_log_num_revoke++;
610 atomic_inc(&gl->gl_revokes); 609 atomic_inc(&gl->gl_revokes);
611 set_bit(GLF_LFLUSH, &gl->gl_flags); 610 set_bit(GLF_LFLUSH, &gl->gl_flags);
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 423bc2d03dd8..cd9a94a6b5bb 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -124,15 +124,13 @@ void gfs2_trans_end(struct gfs2_sbd *sdp)
124} 124}
125 125
126static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl, 126static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl,
127 struct buffer_head *bh, 127 struct buffer_head *bh)
128 const struct gfs2_log_operations *lops)
129{ 128{
130 struct gfs2_bufdata *bd; 129 struct gfs2_bufdata *bd;
131 130
132 bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL); 131 bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL);
133 bd->bd_bh = bh; 132 bd->bd_bh = bh;
134 bd->bd_gl = gl; 133 bd->bd_gl = gl;
135 bd->bd_ops = lops;
136 INIT_LIST_HEAD(&bd->bd_list); 134 INIT_LIST_HEAD(&bd->bd_list);
137 bh->b_private = bd; 135 bh->b_private = bd;
138 return bd; 136 return bd;
@@ -169,7 +167,7 @@ void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh)
169 gfs2_log_unlock(sdp); 167 gfs2_log_unlock(sdp);
170 unlock_buffer(bh); 168 unlock_buffer(bh);
171 if (bh->b_private == NULL) 169 if (bh->b_private == NULL)
172 bd = gfs2_alloc_bufdata(gl, bh, &gfs2_databuf_lops); 170 bd = gfs2_alloc_bufdata(gl, bh);
173 else 171 else
174 bd = bh->b_private; 172 bd = bh->b_private;
175 lock_buffer(bh); 173 lock_buffer(bh);
@@ -210,7 +208,7 @@ void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh)
210 unlock_buffer(bh); 208 unlock_buffer(bh);
211 lock_page(bh->b_page); 209 lock_page(bh->b_page);
212 if (bh->b_private == NULL) 210 if (bh->b_private == NULL)
213 bd = gfs2_alloc_bufdata(gl, bh, &gfs2_buf_lops); 211 bd = gfs2_alloc_bufdata(gl, bh);
214 else 212 else
215 bd = bh->b_private; 213 bd = bh->b_private;
216 unlock_page(bh->b_page); 214 unlock_page(bh->b_page);