Whamcloud - gitweb
LU-4152 mdt: Don't enqueue two locks on the same resource
authorOleg Drokin <oleg.drokin@intel.com>
Tue, 29 Oct 2013 02:15:03 +0000 (22:15 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 14 Feb 2014 16:35:28 +0000 (11:35 -0500)
commit441a52fcb989609f8736a5571337661180439644
treeb502e44df713d31da6c74a5f8732d4e4fbe8c65b
parentcffa2bce7351ddd37ff824ef3c2bd8a7fb7a3239
LU-4152 mdt: Don't enqueue two locks on the same resource

Due to mechanics of ldlm internals, enqueueing two different ibits
lock on the same resource is deadlock prone.
As such change mdt_object_open_lock to release open lock if it becomes
necessary to get exclusive layout lock (to create objects).
It's ok to release the open lock right away as it's never guaranteed to
be issued anyway.

Change-Id: Ib669e68323ea72c75a0a8bea289d8bea079309b0
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/8083
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/mdt/mdt_open.c