Changwei Ge
2018-Mar-15 12:24 UTC
[Ocfs2-devel] [PATCH 1/2] ocfs2/dlm: clean up unused argument for dlm_destroy_recovery_area()
Signed-off-by: Changwei Ge <ge.changwei at h3c.com> --- fs/ocfs2/dlm/dlmrecovery.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index ec8f758..b36808c 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c @@ -62,7 +62,7 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node); static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node); static int dlm_request_all_locks(struct dlm_ctxt *dlm, u8 request_from, u8 dead_node); -static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm, u8 dead_node); +static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm); static inline int dlm_num_locks_in_lockres(struct dlm_lock_resource *res); static void dlm_init_migratable_lockres(struct dlm_migratable_lockres *mres, @@ -739,7 +739,7 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) } if (destroy) - dlm_destroy_recovery_area(dlm, dead_node); + dlm_destroy_recovery_area(dlm); return status; } @@ -764,7 +764,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) ndata = kzalloc(sizeof(*ndata), GFP_NOFS); if (!ndata) { - dlm_destroy_recovery_area(dlm, dead_node); + dlm_destroy_recovery_area(dlm); return -ENOMEM; } ndata->node_num = num; @@ -778,7 +778,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) return 0; } -static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) +static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm) { struct dlm_reco_node_data *ndata, *next; LIST_HEAD(tmplist); -- 2.7.4
Changwei Ge
2018-Mar-15 12:24 UTC
[Ocfs2-devel] [PATCH 2/2] ocfs2/dlm: clean up unused stack variable in dlm_do_local_ast()
Signed-off-by: Changwei Ge <ge.changwei at h3c.com> --- fs/ocfs2/dlm/dlmast.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index fd6bbbb..39831fc 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c @@ -224,14 +224,12 @@ void dlm_do_local_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, struct dlm_lock *lock) { dlm_astlockfunc_t *fn; - struct dlm_lockstatus *lksb; mlog(0, "%s: res %.*s, lock %u:%llu, Local AST\n", dlm->name, res->lockname.len, res->lockname.name, dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); - lksb = lock->lksb; fn = lock->ast; BUG_ON(lock->ml.node != dlm->node_num); -- 2.7.4
piaojun
2018-Mar-15 13:01 UTC
[Ocfs2-devel] [PATCH 1/2] ocfs2/dlm: clean up unused argument for dlm_destroy_recovery_area()
On 2018/3/15 20:24, Changwei Ge wrote:> Signed-off-by: Changwei Ge <ge.changwei at h3c.com>Acked-by: Jun Piao <piaojun at huawei.com>> --- > fs/ocfs2/dlm/dlmrecovery.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c > index ec8f758..b36808c 100644 > --- a/fs/ocfs2/dlm/dlmrecovery.c > +++ b/fs/ocfs2/dlm/dlmrecovery.c > @@ -62,7 +62,7 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node); > static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node); > static int dlm_request_all_locks(struct dlm_ctxt *dlm, > u8 request_from, u8 dead_node); > -static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm, u8 dead_node); > +static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm); > > static inline int dlm_num_locks_in_lockres(struct dlm_lock_resource *res); > static void dlm_init_migratable_lockres(struct dlm_migratable_lockres *mres, > @@ -739,7 +739,7 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) > } > > if (destroy) > - dlm_destroy_recovery_area(dlm, dead_node); > + dlm_destroy_recovery_area(dlm); > > return status; > } > @@ -764,7 +764,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) > > ndata = kzalloc(sizeof(*ndata), GFP_NOFS); > if (!ndata) { > - dlm_destroy_recovery_area(dlm, dead_node); > + dlm_destroy_recovery_area(dlm); > return -ENOMEM; > } > ndata->node_num = num; > @@ -778,7 +778,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) > return 0; > } > > -static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) > +static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm) > { > struct dlm_reco_node_data *ndata, *next; > LIST_HEAD(tmplist); >