s390/dasd: hold request queue sysfs lock when calling elevator_init()
"elevator: Fix a race in elevator switching and md device initialization" changed the semantics of elevator_init() in a way that now enforces to hold the corresponding request queue's sysfs_lock when calling elevator_init() to fix a race. The patch did not convert the s390 dasd device driver which is the only device driver which also calls elevator_init(). So add the missing locking. Cc: Tomoki Sekiyama <tomoki.sekiyama@hds.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
b88fac630b
commit
ef0899410f
1 changed files with 4 additions and 4 deletions
|
@ -2978,12 +2978,12 @@ static int dasd_alloc_queue(struct dasd_block *block)
|
|||
|
||||
elevator_exit(block->request_queue->elevator);
|
||||
block->request_queue->elevator = NULL;
|
||||
mutex_lock(&block->request_queue->sysfs_lock);
|
||||
rc = elevator_init(block->request_queue, "deadline");
|
||||
if (rc) {
|
||||
if (rc)
|
||||
blk_cleanup_queue(block->request_queue);
|
||||
return rc;
|
||||
}
|
||||
return 0;
|
||||
mutex_unlock(&block->request_queue->sysfs_lock);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue