Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
mdadm.7129
0045-Grow-Simplify-error-paths-in-Grow_addbitma...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0045-Grow-Simplify-error-paths-in-Grow_addbitmap.patch of Package mdadm.7129
From 4ed129aca7fd26dd134eecd6fea91dc83ae23aa0 Mon Sep 17 00:00:00 2001 From: Jes Sorensen <Jes.Sorensen@redhat.com> Date: Thu, 12 May 2016 14:37:44 -0400 Subject: [PATCH 270/359] Grow: Simplify error paths in Grow_addbitmap() References: bsc#1081910 This gets rid of some repeated exit paths, making the code a little cleaner. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Coly Li <colyli@suse.de> --- Grow.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Grow.c b/Grow.c index cdd9d05..fc454b8 100755 --- a/Grow.c +++ b/Grow.c @@ -423,22 +423,22 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s) continue; rv = st->ss->load_super(st, fd2, NULL); if (!rv) { - if (!st->ss->add_internal_bitmap( - st, &s->bitmap_chunk, c->delay, - s->write_behind, bitmapsize, - offset_setable, major)) - st->ss->write_bitmap(st, fd2, NodeNumUpdate); - else { + rv = st->ss->add_internal_bitmap( + st, &s->bitmap_chunk, c->delay, + s->write_behind, bitmapsize, + offset_setable, major); + if (!rv) { + st->ss->write_bitmap(st, fd2, + NodeNumUpdate); + } else { pr_err("failed to create internal bitmap - chunksize problem.\n"); - close(fd2); - return 1; } } else { pr_err("failed to load super-block.\n"); - close(fd2); - return 1; } close(fd2); + if (rv) + return 1; } if (offset_setable) { st->ss->getinfo_super(st, mdi, NULL); -- 2.16.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor