[PATCH 05/28] sunrpc: don't call flush_dcache_page() with NULL page pointer
Kevin Coffman
kwc at citi.umich.edu
Mon Mar 31 10:31:18 EDT 2008
For architectures that implement flush_dcache_page(), the struct
page pointer is not expected to be NULL. In _copy_to_pages(),
if the last bytes being copied are the exact last bytes of a
complete page, then the final call to flush_dcache_page() has
a null pointer. Skip the call in that case.
Signed-off-by: Kevin Coffman <kwc at citi.umich.edu>
---
net/sunrpc/xdr.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index de2c986..26991c6 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -262,7 +262,8 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
p += copy;
} while ((len -= copy) != 0);
- flush_dcache_page(*pgto);
+ if (*pgto != NULL)
+ flush_dcache_page(*pgto);
}
/*
More information about the NFSv4
mailing list