commit | 0909dc448c98ed5021c87ffdfc09fb473aa464ab | [log] [tgz] |
---|---|---|
author | NeilBrown <neilb@suse.de> | Wed Jul 01 12:27:21 2009 +1000 |
committer | NeilBrown <neilb@suse.de> | Wed Jul 01 12:27:21 2009 +1000 |
tree | 17c48d146c0f9eb7367a0d0feafea29838eae8eb | |
parent | 1ec22eb2b4a2e1a763106bce36b11c02eaa84e61 [diff] |
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: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>