OSDN Git Service

loop: initialize the worker tracking fields once
authorChristoph Hellwig <hch@lst.de>
Wed, 30 Mar 2022 05:29:09 +0000 (07:29 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Apr 2022 12:54:09 +0000 (06:54 -0600)
commitb15ed54694fbba714931dd81790f86797cf8bed2
tree43c241dd8834f76771d7717fc1ad15d17a508a87
parent2cf429b53c1041a0e90943e1d2a5a7a7f89accb0
loop: initialize the worker tracking fields once

There is no need to reinitialize idle_worker_list, worker_tree and timer
every time a loop device is configured.  Just initialize them once at
allocation time.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Tested-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20220330052917.2566582-8-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c