Since free_super1 actually doesn't change the sb, it
just free the addr space of sb. Also free_super1 is
called in lots of place within mdadm, so remove dlm
lock code since the func doesn't need the protection
and also reduce latency.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
static void free_super1(struct supertype *st)
{
- int rv, lockid;
- if (is_clustered(st)) {
- rv = cluster_get_dlmlock(st, &lockid);
- if (rv) {
- pr_err("Cannot get dlmlock in %s return %d\n", __func__, rv);
- cluster_release_dlmlock(st, lockid);
- return;
- }
- }
if (st->sb)
free(st->sb);
free(di);
}
st->sb = NULL;
- if (is_clustered(st))
- cluster_release_dlmlock(st, lockid);
}
#ifndef MDASSEMBLE