]> git.baikalelectronics.ru Git - kernel.git/commit
staging/lustre/osc: glimpse lock should match only with granted locks
authorAndriy Skulysh <andriy.skulysh@seagate.com>
Mon, 20 Jun 2016 20:55:50 +0000 (16:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jun 2016 21:28:39 +0000 (14:28 -0700)
commitc1021a694b6c54efa58ba3cf36471d46c468db29
tree0bb4acf98a915fcd4874430b18fc086803beda2f
parent5b094b771b1c898cdeadb436af6bd9d14c39eaae
staging/lustre/osc: glimpse lock should match only with granted locks

A deadlock is possible during ccc_prep_size()->ldlm_lock_match() vs
cl_io_lock() which is waiting for a matched lock and conflicts with
already taken lock before ccc_prep_size().

It is better to send an additional lock request to avoid deadlock.

Seagate-bug-id: MRP-3312
Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Reviewed-on: http://review.whamcloud.com/18738
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7829
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_request.c