aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/faulty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/faulty.c')
-rw-r--r--drivers/md/faulty.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c
index 8e3850b98cca..1a8987884614 100644
--- a/drivers/md/faulty.c
+++ b/drivers/md/faulty.c
@@ -169,10 +169,9 @@ static void add_sector(conf_t *conf, sector_t start, int mode)
169 conf->nfaults = n+1; 169 conf->nfaults = n+1;
170} 170}
171 171
172static int make_request(struct request_queue *q, struct bio *bio) 172static int make_request(mddev_t *mddev, struct bio *bio)
173{ 173{
174 mddev_t *mddev = q->queuedata; 174 conf_t *conf = mddev->private;
175 conf_t *conf = (conf_t*)mddev->private;
176 int failit = 0; 175 int failit = 0;
177 176
178 if (bio_data_dir(bio) == WRITE) { 177 if (bio_data_dir(bio) == WRITE) {
@@ -225,7 +224,7 @@ static int make_request(struct request_queue *q, struct bio *bio)
225 224
226static void status(struct seq_file *seq, mddev_t *mddev) 225static void status(struct seq_file *seq, mddev_t *mddev)
227{ 226{
228 conf_t *conf = (conf_t*)mddev->private; 227 conf_t *conf = mddev->private;
229 int n; 228 int n;
230 229
231 if ((n=atomic_read(&conf->counters[WriteTransient])) != 0) 230 if ((n=atomic_read(&conf->counters[WriteTransient])) != 0)
@@ -328,7 +327,7 @@ static int run(mddev_t *mddev)
328 327
329static int stop(mddev_t *mddev) 328static int stop(mddev_t *mddev)
330{ 329{
331 conf_t *conf = (conf_t *)mddev->private; 330 conf_t *conf = mddev->private;
332 331
333 kfree(conf); 332 kfree(conf);
334 mddev->private = NULL; 333 mddev->private = NULL;