aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-10-31 08:24:28 -0400
committerJens Axboe <axboe@kernel.dk>2013-11-08 11:10:29 -0500
commitef0899410ff630b2e75306da49996dbbfa318165 (patch)
tree1e29b53d1e1b7fc0f455cdd92e6e2fb15d4d13b7
parentb88fac630bf71bd0af44502d6688e99a5426d438 (diff)
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>
-rw-r--r--drivers/s390/block/dasd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 451bf99582ff..846d5c6609d8 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2978,12 +2978,12 @@ static int dasd_alloc_queue(struct dasd_block *block)
2978 2978
2979 elevator_exit(block->request_queue->elevator); 2979 elevator_exit(block->request_queue->elevator);
2980 block->request_queue->elevator = NULL; 2980 block->request_queue->elevator = NULL;
2981 mutex_lock(&block->request_queue->sysfs_lock);
2981 rc = elevator_init(block->request_queue, "deadline"); 2982 rc = elevator_init(block->request_queue, "deadline");
2982 if (rc) { 2983 if (rc)
2983 blk_cleanup_queue(block->request_queue); 2984 blk_cleanup_queue(block->request_queue);
2984 return rc; 2985 mutex_unlock(&block->request_queue->sysfs_lock);
2985 } 2986 return rc;
2986 return 0;
2987} 2987}
2988 2988
2989/* 2989/*