blob: 49a04624cfcc934329e473c9f800babe79281b0c [file] [log] [blame]
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index a2d72a8..85d7005 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -6566,8 +6566,10 @@ static bool igb_can_reuse_rx_page(struct
if (unlikely(page_to_nid(page) != numa_node_id()))
return false;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
if (unlikely(page->pfmemalloc))
return false;
+#endif
#if (PAGE_SIZE < 8192)
/* if we are only owner of page we can reuse it */
@@ -6635,8 +6637,12 @@ static bool igb_add_rx_frag(struct igb_r
memcpy(__skb_put(skb, size), va, ALIGN(size, sizeof(long)));
/* we can reuse buffer as-is, just make sure it is local */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
if (likely((page_to_nid(page) == numa_node_id()) &&
!page->pfmemalloc))
+#else
+ if (likely(page_to_nid(page) == numa_node_id()))
+#endif
return true;
/* this page cannot be reused so discard it */