* [Cluster-devel] gfs2: Remove vestigial bd_ops (version 2) [not found] <131831393.35303301.1542724541776.JavaMail.zimbra@redhat.com> @ 2018-11-20 14:37 ` Bob Peterson 2018-11-20 15:39 ` Steven Whitehouse 0 siblings, 1 reply; 2+ messages in thread From: Bob Peterson @ 2018-11-20 14:37 UTC (permalink / raw) To: cluster-devel.redhat.com Hi, Here is a new and improved version of the patch I posted on 16 November. Since the field is no longer needed, neither are the function parameters used to allocate a bd. --- 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> --- fs/gfs2/incore.h | 1 - fs/gfs2/log.c | 1 - fs/gfs2/trans.c | 8 +++----- 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 { u64 bd_blkno; struct list_head bd_list; - const struct gfs2_log_operations *bd_ops; struct gfs2_trans *bd_tr; 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) bd->bd_blkno = bh->b_blocknr; gfs2_remove_from_ail(bd); /* drops ref on bh */ bd->bd_bh = NULL; - bd->bd_ops = &gfs2_revoke_lops; sdp->sd_log_num_revoke++; atomic_inc(&gl->gl_revokes); 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) } static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl, - struct buffer_head *bh, - const struct gfs2_log_operations *lops) + struct buffer_head *bh) { struct gfs2_bufdata *bd; bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL); bd->bd_bh = bh; bd->bd_gl = gl; - bd->bd_ops = lops; INIT_LIST_HEAD(&bd->bd_list); bh->b_private = bd; return bd; @@ -169,7 +167,7 @@ void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) gfs2_log_unlock(sdp); unlock_buffer(bh); if (bh->b_private == NULL) - bd = gfs2_alloc_bufdata(gl, bh, &gfs2_databuf_lops); + bd = gfs2_alloc_bufdata(gl, bh); else bd = bh->b_private; lock_buffer(bh); @@ -210,7 +208,7 @@ void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh) unlock_buffer(bh); lock_page(bh->b_page); if (bh->b_private == NULL) - bd = gfs2_alloc_bufdata(gl, bh, &gfs2_buf_lops); + bd = gfs2_alloc_bufdata(gl, bh); else bd = bh->b_private; unlock_page(bh->b_page); ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] gfs2: Remove vestigial bd_ops (version 2) 2018-11-20 14:37 ` [Cluster-devel] gfs2: Remove vestigial bd_ops (version 2) Bob Peterson @ 2018-11-20 15:39 ` Steven Whitehouse 0 siblings, 0 replies; 2+ messages in thread From: Steven Whitehouse @ 2018-11-20 15:39 UTC (permalink / raw) To: cluster-devel.redhat.com On 20/11/18 14:37, Bob Peterson wrote: > Hi, > > Here is a new and improved version of the patch I posted on > 16 November. Since the field is no longer needed, neither are > the function parameters used to allocate a bd. > --- > 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> Steve. > --- > fs/gfs2/incore.h | 1 - > fs/gfs2/log.c | 1 - > fs/gfs2/trans.c | 8 +++----- > 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 { > u64 bd_blkno; > > struct list_head bd_list; > - const struct gfs2_log_operations *bd_ops; > > struct gfs2_trans *bd_tr; > 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) > bd->bd_blkno = bh->b_blocknr; > gfs2_remove_from_ail(bd); /* drops ref on bh */ > bd->bd_bh = NULL; > - bd->bd_ops = &gfs2_revoke_lops; > sdp->sd_log_num_revoke++; > atomic_inc(&gl->gl_revokes); > 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) > } > > static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl, > - struct buffer_head *bh, > - const struct gfs2_log_operations *lops) > + struct buffer_head *bh) > { > struct gfs2_bufdata *bd; > > bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL); > bd->bd_bh = bh; > bd->bd_gl = gl; > - bd->bd_ops = lops; > INIT_LIST_HEAD(&bd->bd_list); > bh->b_private = bd; > return bd; > @@ -169,7 +167,7 @@ void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) > gfs2_log_unlock(sdp); > unlock_buffer(bh); > if (bh->b_private == NULL) > - bd = gfs2_alloc_bufdata(gl, bh, &gfs2_databuf_lops); > + bd = gfs2_alloc_bufdata(gl, bh); > else > bd = bh->b_private; > lock_buffer(bh); > @@ -210,7 +208,7 @@ void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh) > unlock_buffer(bh); > lock_page(bh->b_page); > if (bh->b_private == NULL) > - bd = gfs2_alloc_bufdata(gl, bh, &gfs2_buf_lops); > + bd = gfs2_alloc_bufdata(gl, bh); > else > bd = bh->b_private; > unlock_page(bh->b_page); > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-20 15:39 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <131831393.35303301.1542724541776.JavaMail.zimbra@redhat.com> 2018-11-20 14:37 ` [Cluster-devel] gfs2: Remove vestigial bd_ops (version 2) Bob Peterson 2018-11-20 15:39 ` Steven Whitehouse
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).