xuejiufei 276533d5ac ocfs2/dlm: ignore cleaning the migration mle that is inuse
commit bef5502de074b6f6fa647b94b73155d675694420 upstream.

We have found that migration source will trigger a BUG that the refcount
of mle is already zero before put when the target is down during
migration.  The situation is as follows:

dlm_migrate_lockres
  dlm_add_migration_mle
  dlm_mark_lockres_migrating
  dlm_get_mle_inuse
  <<<<<< Now the refcount of the mle is 2.
  dlm_send_one_lockres and wait for the target to become the
  new master.
  <<<<<< o2hb detect the target down and clean the migration
  mle. Now the refcount is 1.

dlm_migrate_lockres woken, and put the mle twice when found the target
goes down which trigger the BUG with the following message:

  "ERROR: bad mle: ".

Signed-off-by: Jiufei Xue <xuejiufei@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2016-03-12 14:25:43 +01:00
..
2010-02-09 04:50:48 -08:00
2010-02-09 04:50:46 -08:00
2009-10-04 15:05:10 -07:00
2010-08-13 13:20:21 -07:00
2009-06-17 00:36:36 -04:00
2009-07-12 12:22:34 -07:00
2011-05-09 15:55:12 -07:00
2009-07-12 12:22:34 -07:00
2009-09-23 07:39:30 -07:00
2011-04-22 08:44:15 -07:00
2010-02-09 04:50:47 -08:00
2016-01-29 22:12:45 +01:00
2009-06-18 13:03:46 -07:00
2009-09-24 08:41:47 -04:00
2008-12-31 18:07:43 -05:00
2012-10-07 23:38:20 +02:00
2010-02-23 07:37:44 -08:00
2009-03-31 23:00:26 -04:00
2009-04-07 08:31:16 -07:00
2009-10-04 15:05:10 -07:00
2009-09-23 07:39:29 -07:00
2009-02-18 15:37:53 -08:00