Skip to content

Commit 3db409f

Browse files
Changwei Getorvalds
authored andcommitted
ocfs2/dlm: get mle inuse only when it is initialized
When dlm_add_migration_mle returns -EEXIST, previously input mle will not be initialized. So we can't use its associated dlm object. And we truly don't need this mle for already launched migration progress, since oldmle has taken this role. Link: http://lkml.kernel.org/r/63ADC13FD55D6546B7DECE290D39E373CED7AA61@H3CMLB14-EX.srv.huawei-3com.com Signed-off-by: Changwei Ge <ge.changwei@h3c.com> Reviewed-by: Joseph Qi <jiangqi903@gmail.com> Cc: Mark Fasheh <mfasheh@versity.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 853bc26 commit 3db409f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎fs/ocfs2/dlm/dlmmaster.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,9 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
26162616
* otherwise the assert_master from the new
26172617
* master will destroy this.
26182618
*/
2619-
dlm_get_mle_inuse(mle);
2619+
if (ret != -EEXIST)
2620+
dlm_get_mle_inuse(mle);
2621+
26202622
spin_unlock(&dlm->master_lock);
26212623
spin_unlock(&dlm->spinlock);
26222624

0 commit comments

Comments
 (0)