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>
Fri, 4 May 2012 04:10:53 +0000 (00:10 -0400)
commit7d4a0e9564c759b558806d6be5394fa72ee85d31
tree074348d5df9d738ecf02fad9b3cd9e3c9d364d98
parent64599b0816c012480485722e876253871c267511
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/2604
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