]> git.karo-electronics.de Git - linux-beck.git/commit
staging/lustre/ldlm: Solve a race for LRU lock cancel
authorVitaly Fertman <vitaly.fertman@seagate.com>
Wed, 30 Mar 2016 23:49:06 +0000 (19:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Mar 2016 04:38:13 +0000 (21:38 -0700)
commit6cead36d284f230d29c2500c774180b8c716d4e6
tree5d12748853353ab42338b2cf864a134081e62359
parente9570b490ba209220b43530ca250060035d6bcba
staging/lustre/ldlm: Solve a race for LRU lock cancel

This patch solves a race condition that the lock may be used again
after LRU cancellation policy check. In that case, the lock may have
locked or dirty pages that makes the policy check totally useless.
The problem is solved by checking l_last_used at cancellation time
therefore it can make sure that the lock has not been used.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/12603
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5781
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
drivers/staging/lustre/lustre/ldlm/ldlm_request.c