[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac87a521-0dd3-b30c-caf4-ec0722b05a4f@users.sourceforge.net>
Date: Sat, 10 Sep 2016 22:24:42 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: drbd-dev@...ts.linbit.com,
Lars Ellenberg <lars.ellenberg@...bit.com>,
Philipp Reisner <philipp.reisner@...bit.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 03/13] DRBD-receiver: Move an assignment in receive_uuids()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 10 Sep 2016 19:37:42 +0200
Move one assignment for the local variable "updated_uuids" so that
its setting will only be performed after corresponding memory
allocations succeeded by this function.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/block/drbd/drbd_receiver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index dab3f74..5526f6b 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -4179,7 +4179,7 @@ static int receive_uuids(struct drbd_connection *connection, struct packet_info
struct drbd_device *device;
struct p_uuids *p = pi->data;
u64 *p_uuid;
- int i, updated_uuids = 0;
+ int i, updated_uuids;
peer_device = conn_peer_device(connection, pi->vnr);
if (!peer_device)
@@ -4206,6 +4206,7 @@ static int receive_uuids(struct drbd_connection *connection, struct packet_info
return -EIO;
}
+ updated_uuids = 0;
if (get_ldev(device)) {
int skip_initial_sync =
device->state.conn == C_CONNECTED &&
--
2.10.0
Powered by blists - more mailing lists