diff options
author | NeilBrown <neilb@suse.de> | 2014-12-15 12:56:58 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-02-04 08:35:52 +1100 |
commit | afa0f557cb15176570a18fb2a093e348a793afd4 (patch) | |
tree | 7ae3f6a37ae3e6bcfbea51faadad924df8020095 /drivers/md/linear.c | |
parent | 5aa61f427e4979be733e4847b9199ff9cc48a47e (diff) | |
download | linux-afa0f557cb15176570a18fb2a093e348a793afd4.tar.bz2 |
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/linear.c')
-rw-r--r-- | drivers/md/linear.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index c201555b9c6c..fa7d577f3d12 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c @@ -249,14 +249,11 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev) return 0; } -static int linear_stop (struct mddev *mddev) +static void linear_free(struct mddev *mddev, void *priv) { - struct linear_conf *conf = mddev->private; + struct linear_conf *conf = priv; kfree(conf); - mddev->private = NULL; - - return 0; } static void linear_make_request(struct mddev *mddev, struct bio *bio) @@ -335,7 +332,7 @@ static struct md_personality linear_personality = .owner = THIS_MODULE, .make_request = linear_make_request, .run = linear_run, - .stop = linear_stop, + .free = linear_free, .status = linear_status, .hot_add_disk = linear_add, .size = linear_size, |