lkml.org 
[lkml]   [2003]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] counting bug in svc_tcp_recvfrom causes panic for TCP NFS
Ted Phelps <phelps@dstc.edu.au> wrote:
>
> Perhaps a better solution would be to change page_address() to be
> consistently be a function for all memory layouts.

Assuredly. How about this?

diff -puN include/linux/mm.h~page_address-fix include/linux/mm.h
--- 25/include/linux/mm.h~page_address-fix 2003-01-15 15:23:45.000000000 -0800
+++ 25-akpm/include/linux/mm.h 2003-01-15 15:25:40.000000000 -0800
@@ -296,9 +296,11 @@ static inline void set_page_zone(struct
page->flags |= zone_num << ZONE_SHIFT;
}

-#define lowmem_page_address(page) \
- __va( ( ((page) - page_zone(page)->zone_mem_map) \
- + page_zone(page)->zone_start_pfn) << PAGE_SHIFT)
+static inline void *lowmem_page_address(struct page *page)
+{
+ return __va(((page - page_zone(page)->zone_mem_map)
+ + page_zone(page)->zone_start_pfn) << PAGE_SHIFT);
+}

#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
#define HASHED_PAGE_VIRTUAL
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.042 / U:1.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site