aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netfront.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r--drivers/net/xen-netfront.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 3c3dd403f5dd..5c7a87e38951 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -471,7 +471,7 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
471 unsigned int offset = offset_in_page(data); 471 unsigned int offset = offset_in_page(data);
472 unsigned int len = skb_headlen(skb); 472 unsigned int len = skb_headlen(skb);
473 473
474 frags += (offset + len + PAGE_SIZE - 1) / PAGE_SIZE; 474 frags += DIV_ROUND_UP(offset + len, PAGE_SIZE);
475 if (unlikely(frags > MAX_SKB_FRAGS + 1)) { 475 if (unlikely(frags > MAX_SKB_FRAGS + 1)) {
476 printk(KERN_ALERT "xennet: skb rides the rocket: %d frags\n", 476 printk(KERN_ALERT "xennet: skb rides the rocket: %d frags\n",
477 frags); 477 frags);