From: Lars Ellenberg Date: Mon, 13 Sep 2010 11:27:10 +0000 (+0200) Subject: drbd: DIV_ROUND_UP not needed here X-Git-Tag: upstream/snapshot3+hdmi~12709^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78db89287ce0f146a1f2a019a0b243ea4557caac;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git drbd: DIV_ROUND_UP not needed here Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index daa672f..83ba63a 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -915,7 +915,7 @@ static void move_to_net_ee_or_free(struct drbd_conf *mdev, struct drbd_epoch_ent { if (drbd_ee_has_active_page(e)) { /* This might happen if sendpage() has not finished */ - int i = DIV_ROUND_UP(e->size, PAGE_SIZE); + int i = (e->size + PAGE_SIZE -1) >> PAGE_SHIFT; atomic_add(i, &mdev->pp_in_use_by_net); atomic_sub(i, &mdev->pp_in_use); spin_lock_irq(&mdev->req_lock);