mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
5aa61f427e
commit
afa0f557cb
9 changed files with 35 additions and 50 deletions
|
@ -332,13 +332,11 @@ static int run(struct mddev *mddev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int stop(struct mddev *mddev)
|
||||
static void faulty_free(struct mddev *mddev, void *priv)
|
||||
{
|
||||
struct faulty_conf *conf = mddev->private;
|
||||
struct faulty_conf *conf = priv;
|
||||
|
||||
kfree(conf);
|
||||
mddev->private = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct md_personality faulty_personality =
|
||||
|
@ -348,7 +346,7 @@ static struct md_personality faulty_personality =
|
|||
.owner = THIS_MODULE,
|
||||
.make_request = make_request,
|
||||
.run = run,
|
||||
.stop = stop,
|
||||
.free = faulty_free,
|
||||
.status = status,
|
||||
.check_reshape = reshape,
|
||||
.size = faulty_size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue