aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/faulty.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-12-14 20:56:58 -0500
committerNeilBrown <neilb@suse.de>2015-02-03 16:35:52 -0500
commitafa0f557cb15176570a18fb2a093e348a793afd4 (patch)
tree7ae3f6a37ae3e6bcfbea51faadad924df8020095 /drivers/md/faulty.c
parent5aa61f427e4979be733e4847b9199ff9cc48a47e (diff)
md: rename ->stop to ->free
Now that the ->stop function only frees the private data, rename is accordingly. Also pass in the private pointer as an arg rather than using mddev->private. This flexibility will be useful in level_store(). Finally, don't clear ->private. It doesn't make sense to clear it seeing that isn't what we free, and it is no longer necessary to clear ->private (it was some time ago before ->to_remove was introduced). Setting ->to_remove in ->free() is a bit of a wart, but not a big problem at the moment. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/faulty.c')
-rw-r--r--drivers/md/faulty.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c
index e8b4574956c7..1277eb26b58a 100644
--- a/drivers/md/faulty.c
+++ b/drivers/md/faulty.c
@@ -332,13 +332,11 @@ static int run(struct mddev *mddev)
332 return 0; 332 return 0;
333} 333}
334 334
335static int stop(struct mddev *mddev) 335static void faulty_free(struct mddev *mddev, void *priv)
336{ 336{
337 struct faulty_conf *conf = mddev->private; 337 struct faulty_conf *conf = priv;
338 338
339 kfree(conf); 339 kfree(conf);
340 mddev->private = NULL;
341 return 0;
342} 340}
343 341
344static struct md_personality faulty_personality = 342static struct md_personality faulty_personality =
@@ -348,7 +346,7 @@ static struct md_personality faulty_personality =
348 .owner = THIS_MODULE, 346 .owner = THIS_MODULE,
349 .make_request = make_request, 347 .make_request = make_request,
350 .run = run, 348 .run = run,
351 .stop = stop, 349 .free = faulty_free,
352 .status = status, 350 .status = status,
353 .check_reshape = reshape, 351 .check_reshape = reshape,
354 .size = faulty_size, 352 .size = faulty_size,