Skip to content
Commit 0909dc44 authored by NeilBrown's avatar NeilBrown
Browse files

md: tidy up error paths in md_alloc



As the recent bug in md_alloc showed, having a single exit path for
unlocking and putting is a good idea.  So restructure md_alloc to have
a single mutex_unlock and mddev_put, and use gotos where necessary.

Found-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 1ec22eb2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment