summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2018-01-04 20:14:57 +0300
committerMike Snitzer <snitzer@redhat.com>2018-01-17 17:16:04 +0300
commit0e696d385d4be83055d8281f7e089a1b9ea18a1a (patch)
tree3000cf346e2bb9dffd7dff64f5219ec4e2fff7df /drivers/md
parent46898e9a7ac9fb2d0d108cc7b753abccbf9d9f20 (diff)
downloadlinux-0e696d385d4be83055d8281f7e089a1b9ea18a1a.tar.xz
dm bufio: eliminate unnecessary labels in dm_bufio_client_create()
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-bufio.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index b98c72fa7322..414c9af54ded 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -1716,7 +1716,7 @@ struct dm_bufio_client *dm_bufio_client_create(struct block_device *bdev, unsign
if (!DM_BUFIO_CACHE_NAME(c)) {
r = -ENOMEM;
mutex_unlock(&dm_bufio_clients_lock);
- goto bad_cache;
+ goto bad;
}
}
@@ -1727,7 +1727,7 @@ struct dm_bufio_client *dm_bufio_client_create(struct block_device *bdev, unsign
if (!DM_BUFIO_CACHE(c)) {
r = -ENOMEM;
mutex_unlock(&dm_bufio_clients_lock);
- goto bad_cache;
+ goto bad;
}
}
}
@@ -1738,7 +1738,7 @@ struct dm_bufio_client *dm_bufio_client_create(struct block_device *bdev, unsign
if (!b) {
r = -ENOMEM;
- goto bad_buffer;
+ goto bad;
}
__free_buffer_wake(b);
}
@@ -1749,7 +1749,7 @@ struct dm_bufio_client *dm_bufio_client_create(struct block_device *bdev, unsign
c->shrinker.batch = 0;
r = register_shrinker(&c->shrinker);
if (r)
- goto bad_shrinker;
+ goto bad;
mutex_lock(&dm_bufio_clients_lock);
dm_bufio_client_count++;
@@ -1759,9 +1759,7 @@ struct dm_bufio_client *dm_bufio_client_create(struct block_device *bdev, unsign
return c;
-bad_shrinker:
-bad_buffer:
-bad_cache:
+bad:
while (!list_empty(&c->reserved_buffers)) {
struct dm_buffer *b = list_entry(c->reserved_buffers.next,
struct dm_buffer, lru_list);