Whamcloud - gitweb
LU-1222 ldlm: Fix the race in AST sender vs multiple arriving RPCs
authorOleg Drokin <green@whamcloud.com>
Tue, 20 Mar 2012 03:43:37 +0000 (23:43 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Mar 2012 13:56:16 +0000 (09:56 -0400)
commit5c3a69e52444f8ea17849df1f9de0465d1398224
tree9e3b902ad3bd6ec9c7cfc4a131b17050065d5cdb
parent91dbd0b99e4d3fb6fe6a870cbf7297b5a362f05f
LU-1222 ldlm: Fix the race in AST sender vs multiple arriving RPCs

LU-1046 tried to close this race, but still left a bit of a window open.
Basically when two last RPCs arrive one of them is declared as "last"
and it is the one that would release "rpc" part of the arg refcount.
The problem is the "non last" rpc might actually finish processing later.

To combat this every RPC will now hold its own arg reference.

Change-Id: I0d1e69dc6ea37224422d4c7822bb1e6b9417585b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2350
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
lustre/ldlm/ldlm_lockd.c