diff options
author | Jerome Marchand <jmarchan@redhat.com> | 2011-01-05 18:57:37 +0300 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-01-05 18:57:37 +0300 |
commit | e4a683c899cd5a49f8d684a054c95bd115a0c005 (patch) | |
tree | c7e79e24199a5ed34a488b06cfd3fa890637db7d /block/blk-core.c | |
parent | a6e8dc46ff0b7defbfa4f29a71aee263377ec573 (diff) | |
download | linux-e4a683c899cd5a49f8d684a054c95bd115a0c005.tar.xz |
kref: add kref_test_and_get
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 <jmarchan@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-core.c')
0 files changed, 0 insertions, 0 deletions