Patch: Make af_packet use {Set,Clear}PageReserved

From: Russell King (rmk@arm.linux.org.uk)
Date: Mon Aug 28 2000 - 15:27:27 EST


Linus,

I'm not sure why net/packet/af_packet.c doesn't use these macros that are
defined in pagemap.h. Here is a patch to convert it.

diff -urN linux-orig/net/packet/af_packet.c linux/net/packet/af_packet.c
--- linux-orig/net/packet/af_packet.c Sat Aug 26 19:56:54 2000
+++ linux/net/packet/af_packet.c Sat Aug 26 19:48:38 2000
@@ -1585,7 +1585,7 @@
 
                         pend = virt_to_page(pg_vec[i] + (PAGE_SIZE << order) - 1);
                         for (page = virt_to_page(pg_vec[i]); page <= pend; page++)
- clear_bit(PG_reserved, &page->flags);
+ ClearPageReserved(page);
                         free_pages(pg_vec[i], order);
                 }
         }
@@ -1640,7 +1640,7 @@
 
                         pend = virt_to_page(pg_vec[i] + (PAGE_SIZE << order) - 1);
                         for (page = virt_to_page(pg_vec[i]); page <= pend; page++)
- set_bit(PG_reserved, &page->flags);
+ SetPageReserved(page);
                 }
                 /* Page vector is allocated */
 

   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:21 EST