staging: zcache: fix serialization bug in zv stats
authorSeth Jennings <sjenning@linux.vnet.ibm.com>
Thu, 9 Feb 2012 18:25:02 +0000 (12:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 18:47:58 +0000 (10:47 -0800)
commit72a9826b45c0d126f47c1acc8444c5d9ee478fcd
treef4ac7c1bb888dd39cff9889b57b96b4c3e88d3ba
parent8f9cde23c3f7b74dfad617d2ffbbb5c2ba55e1ee
staging: zcache: fix serialization bug in zv stats

In a multithreaded workload, the zv_curr_dist_counts
and zv_cumul_dist_counts statistics are being corrupted
because the increments and decrements in zv_create
and zv_free are not atomic.

This patch converts these statistics and their corresponding
increments/decrements/reads to atomic operations.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zcache/zcache-main.c