]> git.openfabrics.org - compat-rdma/compat.git/commitdiff
compat: Add __skb_frag_unref
authorVladimir Sokolovsky <vlad@mellanox.com>
Sun, 5 Aug 2012 18:18:12 +0000 (21:18 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Sun, 5 Aug 2012 18:21:31 +0000 (21:21 +0300)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
include/linux/compat-3.2.h

index c44bec156947da155a3fe607af749df0eba4666d..d888d81d6a025f01af70b54fbd3a563d014575f8 100644 (file)
@@ -115,6 +115,17 @@ static inline void skb_frag_size_sub(skb_frag_t *frag, int delta)
        frag->size -= delta;
 }
 
+/**
+ * __skb_frag_unref - release a reference on a paged fragment.
+ * @frag: the paged fragment
+ *
+ * Releases a reference on the paged fragment @frag.
+ */
+static inline void __skb_frag_unref(skb_frag_t *frag)
+{
+       put_page(skb_frag_page(frag));
+}
+
 #endif /* CONFIG_COMPAT_SKB_FRAG_NEEDED */
 
 static inline char *hex_byte_pack(char *buf, u8 byte)