Skip to content

Commit

Permalink
ocfs2/dlm: get mle inuse only when it is initialized
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Changwei Ge authored and torvalds committed Nov 16, 2017
1 parent 853bc26 commit 3db409f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ocfs2/dlm/dlmmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,9 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
* otherwise the assert_master from the new
* master will destroy this.
*/
dlm_get_mle_inuse(mle);
if (ret != -EEXIST)
dlm_get_mle_inuse(mle);

spin_unlock(&dlm->master_lock);
spin_unlock(&dlm->spinlock);

Expand Down

0 comments on commit 3db409f

Please sign in to comment.