drbd: fix a wrong likely(), updated comments
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
parent
c9d963a46d
commit
9676c76097
@ -295,6 +295,7 @@ void drbd_csum_bio(struct drbd_conf *mdev, struct crypto_hash *tfm, struct bio *
|
|||||||
crypto_hash_final(&desc, digest);
|
crypto_hash_final(&desc, digest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* MAYBE merge common code with w_e_end_ov_req */
|
||||||
static int w_e_send_csum(struct drbd_work *w, int cancel)
|
static int w_e_send_csum(struct drbd_work *w, int cancel)
|
||||||
{
|
{
|
||||||
struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w);
|
struct drbd_peer_request *peer_req = container_of(w, struct drbd_peer_request, w);
|
||||||
@ -306,7 +307,7 @@ static int w_e_send_csum(struct drbd_work *w, int cancel)
|
|||||||
if (unlikely(cancel))
|
if (unlikely(cancel))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (likely((peer_req->flags & EE_WAS_ERROR) != 0))
|
if (unlikely((peer_req->flags & EE_WAS_ERROR) != 0))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
digest_size = crypto_hash_digestsize(mdev->csums_tfm);
|
digest_size = crypto_hash_digestsize(mdev->csums_tfm);
|
||||||
@ -315,7 +316,7 @@ static int w_e_send_csum(struct drbd_work *w, int cancel)
|
|||||||
sector_t sector = peer_req->i.sector;
|
sector_t sector = peer_req->i.sector;
|
||||||
unsigned int size = peer_req->i.size;
|
unsigned int size = peer_req->i.size;
|
||||||
drbd_csum_ee(mdev, mdev->csums_tfm, peer_req, digest);
|
drbd_csum_ee(mdev, mdev->csums_tfm, peer_req, digest);
|
||||||
/* Free e and pages before send.
|
/* Free peer_req and pages before send.
|
||||||
* In case we block on congestion, we could otherwise run into
|
* In case we block on congestion, we could otherwise run into
|
||||||
* some distributed deadlock, if the other side blocks on
|
* some distributed deadlock, if the other side blocks on
|
||||||
* congestion as well, because our receiver blocks in
|
* congestion as well, because our receiver blocks in
|
||||||
@ -1151,7 +1152,7 @@ int w_e_end_ov_reply(struct drbd_work *w, int cancel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free e and pages before send.
|
/* Free peer_req and pages before send.
|
||||||
* In case we block on congestion, we could otherwise run into
|
* In case we block on congestion, we could otherwise run into
|
||||||
* some distributed deadlock, if the other side blocks on
|
* some distributed deadlock, if the other side blocks on
|
||||||
* congestion as well, because our receiver blocks in
|
* congestion as well, because our receiver blocks in
|
||||||
|
Loading…
Reference in New Issue
Block a user