diff options
author | Javier González <javier@javigon.com> | 2018-12-11 22:16:21 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-11 22:22:34 +0300 |
commit | 42bd0384d77ef7552954056928018f5cfa91a013 (patch) | |
tree | cf6d0cf36fb17c73e75606ef2f9247fad68ef25f /lib/decompress_inflate.c | |
parent | 85136c0102852fe505c0fbd3f1bf9d17038bb94d (diff) | |
download | linux-42bd0384d77ef7552954056928018f5cfa91a013.tar.xz |
lightnvm: pblk: avoid ref warning on cache creation
The current kref implementation around pblk global caches triggers a
false positive on refcount_inc_checked() (when called) as the kref is
initialized to 0. Instead of usint kref_inc() on a 0 reference, which is
in principle correct, use kref_init() to avoid the check. This is also
more explicit about what actually happens on cache creation.
In the process, do a small refactoring to use kref helpers.
Fixes: 1864de94ec9d6 "lightnvm: pblk: stop recreating global caches"
Signed-off-by: Javier González <javier@cnexlabs.com>
Reviewed-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/decompress_inflate.c')
0 files changed, 0 insertions, 0 deletions