From: Andrew Morton Cc: "Ken Chen" Cc: Zach Brown Signed-off-by: Andrew Morton --- fs/pipe.c | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) diff -puN fs/pipe.c~cache-pipe-buf-page-address-for-non-highmem-arch-fix-tidy fs/pipe.c --- a/fs/pipe.c~cache-pipe-buf-page-address-for-non-highmem-arch-fix-tidy +++ a/fs/pipe.c @@ -22,17 +22,36 @@ #include #ifdef CONFIG_HIGHMEM -#define pipe_kmap kmap -#define pipe_kmap_atomic kmap_atomic -#define pipe_kunmap kunmap -#define pipe_kunmap_atomic kunmap_atomic +static inline void *pipe_kmap(struct page *page) +{ + return kmap(page); +} + +static inline void pipe_kunmap(struct page *page) +{ + kunmap(page); +} + +static inline void *pipe_kmap_atomic(struct page *page, enum km_type type) +{ + return kmap_atomic(page, type); +} + +static inline void pipe_kunmap_atomic(void *addr, enum km_type type) +{ + kunmap_atomic(addr, type); +} #else /* CONFIG_HIGHMEM */ static inline void *pipe_kmap(struct page *page) { - return (void *) page->private; + return (void *)page->private; } + +static inline void pipe_kunmap(struct page *page) +{ +} + #define pipe_kmap_atomic(page, type) pipe_kmap(page) -#define pipe_kunmap(page) do { } while (0) #define pipe_kunmap_atomic(page, type) do { } while (0) #endif _