diff options
author | Christoph Hellwig <hch@lst.de> | 2021-08-11 15:44:27 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-13 23:17:39 +0300 |
commit | 6177b56c96ff3b5e23d47f6b6c8630f31145da93 (patch) | |
tree | 37aa161a899ba695984ca13a3fc8d4ec0cc8382e /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 7bdc00cf7e369b3be17f26e5643da28de98d9d6d (diff) | |
download | linux-6177b56c96ff3b5e23d47f6b6c8630f31145da93.tar.xz |
nbd: refactor device search and allocation in nbd_genl_connect
Use idr_for_each_entry instead of the awkward callback to find an
existing device for the index == -1 case, and de-duplicate the device
allocation if no existing device was found.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210811124428.2368491-6-hch@lst.de
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions