struct list_head out_of_sequence_requests;
struct crypto_hash *cram_hmac_tfm;
- struct crypto_hash *integrity_tfm; /* checksums we compute */
+ struct crypto_hash *integrity_tfm; /* checksums we compute, updates protected by tconn->data->mutex */
struct crypto_hash *peer_integrity_tfm; /* checksums we verify */
struct crypto_hash *csums_tfm;
struct crypto_hash *verify_tfm;
int dgs;
int err;
+ sock = &mdev->tconn->data;
+ p = drbd_prepare_command(mdev, sock);
dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_tfm) ?
crypto_hash_digestsize(mdev->tconn->integrity_tfm) : 0;
- sock = &mdev->tconn->data;
- p = drbd_prepare_command(mdev, sock);
if (!p)
return -EIO;
p->sector = cpu_to_be64(req->i.sector);
int err;
int dgs;
+ sock = &mdev->tconn->data;
+ p = drbd_prepare_command(mdev, sock);
+
dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_tfm) ?
crypto_hash_digestsize(mdev->tconn->integrity_tfm) : 0;
- sock = &mdev->tconn->data;
- p = drbd_prepare_command(mdev, sock);
if (!p)
return -EIO;
p->sector = cpu_to_be64(peer_req->i.sector);