]> granicus.if.org Git - spl/commit
atomic_*_*_nv() functions need to return the new value atomically.
authorRicardo M. Correia <ricardo.correia@oracle.com>
Fri, 17 Sep 2010 23:03:15 +0000 (16:03 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 17 Sep 2010 23:03:25 +0000 (16:03 -0700)
commita68d91d770c0d4b8b72d9d07e65a79f3f99f03c6
tree97b1bda81f1eba74492dd53a0f596d9d6bae8811
parentd5fcc5f51c9c3f65db5d521c53b696c074b92247
atomic_*_*_nv() functions need to return the new value atomically.

A local variable must be used for the return value to avoid a
potential race once the spin lock is dropped.

Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
include/sys/atomic.h