Whamcloud - gitweb
LU-1602 ldlm: Fix flock deadlock detection race
authorAndriy Skulysh <Andriy_Skulysh@xyratex.com>
Mon, 21 Jan 2013 21:15:23 +0000 (23:15 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 21 Jun 2013 21:32:55 +0000 (17:32 -0400)
commit2154bab56ba8dfe91b7848ca38c4ac38a9f304b1
tree1ef81d1da4b7aabe04d6a3acb42634137041d236
parent6b29f5f6dedff1231da11606207ff507ed002351
LU-1602 ldlm: Fix flock deadlock detection race

Deadlock isn't detected if 2 threads are trying to
grant 2 locks which deadlock on each other.
They call ldlm_flock_deadlock() simultaneously
and deadlock ins't detected.

The soulition is to add lock to blocking list before
calling ldlm_flock_deadlock()

Xyratex-bug-id: MRP-412
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Change-Id: I437c8b40a58de14bbac3da39d98d0f03d0f2e064
Reviewed-on: http://review.whamcloud.com/3277
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ldlm/ldlm_flock.c