Whamcloud - gitweb
LU-3430 nrs: Fix a race condition in the ORR policy
Checking the atomic oo_ref in nrs_orr_hop_put_free() and then
taking the bucket lock leaves a race window open, by which a
second thread can attempt to free an already-freed
nrs_orr_object. Fix this, and change the hash bucket lock type
from an rwlock to a spinlock, as there are now as many calls on
the write path, as there are on the read path. Rehashing is not
used on the hashes, so libcfs_hash API usage can also be
simplified.
Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I2e16320c5e4b0803e1bef428f26ea18b0341ac5f
Xyratex-bug-id: MRP-1294
Reviewed-on: http://review.whamcloud.com/7623
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>