diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-07-15 10:48:49 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 10:57:55 -0500 |
commit | b792c35cfb336b456e9e2455082ff12d4a76b98f (patch) | |
tree | d7d2e4b31de8cd939f37381f183890fa65a3d1f4 | |
parent | 5af172ed9ef2c6b11e0d27c06647f14f6f8115b9 (diff) |
drbd: receive_protocol(): Give variables more easily searchable names
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index bfbc10352faa..11f2e7273e13 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -3002,7 +3002,7 @@ static int receive_protocol(struct drbd_tconn *tconn, struct packet_info *pi) | |||
3002 | int p_proto, p_discard_my_data, p_two_primaries, cf; | 3002 | int p_proto, p_discard_my_data, p_two_primaries, cf; |
3003 | struct net_conf *nc, *old_net_conf, *new_net_conf = NULL; | 3003 | struct net_conf *nc, *old_net_conf, *new_net_conf = NULL; |
3004 | char integrity_alg[SHARED_SECRET_MAX] = ""; | 3004 | char integrity_alg[SHARED_SECRET_MAX] = ""; |
3005 | struct crypto_hash *peer_tfm = NULL, *tfm = NULL; | 3005 | struct crypto_hash *peer_integrity_tfm = NULL, *integrity_tfm = NULL; |
3006 | void *int_dig_in = NULL, *int_dig_vv = NULL; | 3006 | void *int_dig_in = NULL, *int_dig_vv = NULL; |
3007 | 3007 | ||
3008 | p_proto = be32_to_cpu(p->protocol); | 3008 | p_proto = be32_to_cpu(p->protocol); |
@@ -3028,15 +3028,15 @@ static int receive_protocol(struct drbd_tconn *tconn, struct packet_info *pi) | |||
3028 | if (integrity_alg[0]) { | 3028 | if (integrity_alg[0]) { |
3029 | int hash_size; | 3029 | int hash_size; |
3030 | 3030 | ||
3031 | peer_tfm = crypto_alloc_hash(integrity_alg, 0, CRYPTO_ALG_ASYNC); | 3031 | peer_integrity_tfm = crypto_alloc_hash(integrity_alg, 0, CRYPTO_ALG_ASYNC); |
3032 | tfm = crypto_alloc_hash(integrity_alg, 0, CRYPTO_ALG_ASYNC); | 3032 | integrity_tfm = crypto_alloc_hash(integrity_alg, 0, CRYPTO_ALG_ASYNC); |
3033 | if (!(peer_tfm && tfm)) { | 3033 | if (!(peer_integrity_tfm && integrity_tfm)) { |
3034 | conn_err(tconn, "peer data-integrity-alg %s not supported\n", | 3034 | conn_err(tconn, "peer data-integrity-alg %s not supported\n", |
3035 | integrity_alg); | 3035 | integrity_alg); |
3036 | goto disconnect; | 3036 | goto disconnect; |
3037 | } | 3037 | } |
3038 | 3038 | ||
3039 | hash_size = crypto_hash_digestsize(tfm); | 3039 | hash_size = crypto_hash_digestsize(integrity_tfm); |
3040 | int_dig_in = kmalloc(hash_size, GFP_KERNEL); | 3040 | int_dig_in = kmalloc(hash_size, GFP_KERNEL); |
3041 | int_dig_vv = kmalloc(hash_size, GFP_KERNEL); | 3041 | int_dig_vv = kmalloc(hash_size, GFP_KERNEL); |
3042 | if (!(int_dig_in && int_dig_vv)) { | 3042 | if (!(int_dig_in && int_dig_vv)) { |
@@ -3065,7 +3065,7 @@ static int receive_protocol(struct drbd_tconn *tconn, struct packet_info *pi) | |||
3065 | new_net_conf->integrity_alg_len = strlen(integrity_alg) + 1; | 3065 | new_net_conf->integrity_alg_len = strlen(integrity_alg) + 1; |
3066 | 3066 | ||
3067 | crypto_free_hash(tconn->integrity_tfm); | 3067 | crypto_free_hash(tconn->integrity_tfm); |
3068 | tconn->integrity_tfm = tfm; | 3068 | tconn->integrity_tfm = integrity_tfm; |
3069 | 3069 | ||
3070 | rcu_assign_pointer(tconn->net_conf, new_net_conf); | 3070 | rcu_assign_pointer(tconn->net_conf, new_net_conf); |
3071 | mutex_unlock(&tconn->conf_update); | 3071 | mutex_unlock(&tconn->conf_update); |
@@ -3074,7 +3074,7 @@ static int receive_protocol(struct drbd_tconn *tconn, struct packet_info *pi) | |||
3074 | crypto_free_hash(tconn->peer_integrity_tfm); | 3074 | crypto_free_hash(tconn->peer_integrity_tfm); |
3075 | kfree(tconn->int_dig_in); | 3075 | kfree(tconn->int_dig_in); |
3076 | kfree(tconn->int_dig_vv); | 3076 | kfree(tconn->int_dig_vv); |
3077 | tconn->peer_integrity_tfm = peer_tfm; | 3077 | tconn->peer_integrity_tfm = peer_integrity_tfm; |
3078 | tconn->int_dig_in = int_dig_in; | 3078 | tconn->int_dig_in = int_dig_in; |
3079 | tconn->int_dig_vv = int_dig_vv; | 3079 | tconn->int_dig_vv = int_dig_vv; |
3080 | 3080 | ||
@@ -3137,8 +3137,8 @@ static int receive_protocol(struct drbd_tconn *tconn, struct packet_info *pi) | |||
3137 | disconnect_rcu_unlock: | 3137 | disconnect_rcu_unlock: |
3138 | rcu_read_unlock(); | 3138 | rcu_read_unlock(); |
3139 | disconnect: | 3139 | disconnect: |
3140 | crypto_free_hash(peer_tfm); | 3140 | crypto_free_hash(peer_integrity_tfm); |
3141 | crypto_free_hash(tfm); | 3141 | crypto_free_hash(integrity_tfm); |
3142 | kfree(int_dig_in); | 3142 | kfree(int_dig_in); |
3143 | kfree(int_dig_vv); | 3143 | kfree(int_dig_vv); |
3144 | conn_request_state(tconn, NS(conn, C_DISCONNECTING), CS_HARD); | 3144 | conn_request_state(tconn, NS(conn, C_DISCONNECTING), CS_HARD); |