aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2010-09-13 07:27:10 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-10-14 12:38:39 -0400
commit78db89287ce0f146a1f2a019a0b243ea4557caac (patch)
tree2617438befb8ade666103f40f009e89f184464bc /drivers/block
parent5a75cc7cfbb98e896232902214432dae30653dfe (diff)
drbd: DIV_ROUND_UP not needed here
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_worker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index daa672fc46e9..83ba63ab2358 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
915{ 915{
916 if (drbd_ee_has_active_page(e)) { 916 if (drbd_ee_has_active_page(e)) {
917 /* This might happen if sendpage() has not finished */ 917 /* This might happen if sendpage() has not finished */
918 int i = DIV_ROUND_UP(e->size, PAGE_SIZE); 918 int i = (e->size + PAGE_SIZE -1) >> PAGE_SHIFT;
919 atomic_add(i, &mdev->pp_in_use_by_net); 919 atomic_add(i, &mdev->pp_in_use_by_net);
920 atomic_sub(i, &mdev->pp_in_use); 920 atomic_sub(i, &mdev->pp_in_use);
921 spin_lock_irq(&mdev->req_lock); 921 spin_lock_irq(&mdev->req_lock);