staging/lustre/ldlm: Hold lock when clearing flag
authorLi Xi <pkuelelixi@gmail.com>
Sun, 27 Apr 2014 17:06:31 +0000 (13:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Apr 2014 17:21:38 +0000 (10:21 -0700)
commit88e4ff862daa4d484de0462d1c95683ad627fe23
tree4daa9d7b47941f7edac8f142623f32b21f26360f
parentb3d0dfe5abccf79dfe2f5c8cf46b26764b809976
staging/lustre/ldlm: Hold lock when clearing flag

This patch moves lock's skip flag clearing from lru-delete to
lru-add code to prevent clearing lock's flag without resource lock
protection.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Reviewed-on: http://review.whamcloud.com/8772
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4269
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c