From: Jerome Marchand Date: Wed, 5 Jan 2011 15:57:37 +0000 (+0100) Subject: kref: add kref_test_and_get X-Git-Tag: v2.6.37.1~153 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07384b42b672c8ea266ea4ba50c5e50c9323ae9f;p=pandora-kernel.git kref: add kref_test_and_get commit e4a683c899cd5a49f8d684a054c95bd115a0c005 upstream. Add kref_test_and_get() function, which atomically add a reference only if refcount is not zero. This prevent to add a reference to an object that is already being removed. Signed-off-by: Jerome Marchand Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed