Whamcloud - gitweb
LU-1217 osc: to not check a cl_lock's state w/o protection
authorJinshan Xiong <jinshan.xiong@whamcloud.com>
Mon, 26 Mar 2012 19:17:17 +0000 (12:17 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 29 May 2012 17:21:07 +0000 (13:21 -0400)
commite3a2dd10aa877dfa437a4215d78e6b5d40c87bb4
treebadcd18e4ad833f86d7627f05db32b5d9c5077d0
parentd517440d54715a37d4b29e9e6076391bec33e423
LU-1217 osc: to not check a cl_lock's state w/o protection

osc_page_putref_lock() used to check cl_lock's refcount and
corresponding osc_lock's ols_hold without any protection, this
is racy because other process can change the lock state so as to
make the assertion be false.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I65fe1fa7fc55e8642fea6789784d7bb92a45d56f
Reviewed-on: http://review.whamcloud.com/2616
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_page.c