]> Pileus Git - ~andy/linux/blobdiff - net/xfrm/xfrm_algo.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[~andy/linux] / net / xfrm / xfrm_algo.c
index 313d4bed3aa9444d9817aa6f57adacfa1d49d75f..1686f64c4352c2ee19d565d54017608474a98b83 100644 (file)
@@ -21,7 +21,6 @@
 #if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE)
 #include <net/esp.h>
 #endif
-#include <asm/scatterlist.h>
 
 /*
  * Algorithms supported by IPsec.  These entries contain properties which
@@ -553,9 +552,7 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
                if (copy > len)
                        copy = len;
 
-               sg_set_page(&sg, virt_to_page(skb->data + offset));
-               sg.offset = (unsigned long)(skb->data + offset) % PAGE_SIZE;
-               sg.length = copy;
+               sg_init_one(&sg, skb->data + offset, copy);
 
                err = icv_update(desc, &sg, copy);
                if (unlikely(err))
@@ -578,9 +575,9 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
                        if (copy > len)
                                copy = len;
 
-                       sg_set_page(&sg, frag->page);
-                       sg.offset = frag->page_offset + offset-start;
-                       sg.length = copy;
+                       sg_init_table(&sg, 1);
+                       sg_set_page(&sg, frag->page, copy,
+                                   frag->page_offset + offset-start);
 
                        err = icv_update(desc, &sg, copy);
                        if (unlikely(err))