
From: Trivial Patch Monkey <trivial@rustcorp.com.au>

From:  Carl Spalletta <ioanamitu@yahoo.com>


---

 25-akpm/mm/filemap.c      |    2 +-
 25-akpm/mm/filemap.c.orig |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff -puN mm/filemap.c~filemap-comment-fix mm/filemap.c
--- 25/mm/filemap.c~filemap-comment-fix	2004-03-14 14:25:01.634187200 -0800
+++ 25-akpm/mm/filemap.c	2004-03-14 14:25:01.638186592 -0800
@@ -576,7 +576,7 @@ EXPORT_SYMBOL(grab_cache_page_nowait);
 
 /*
  * This is a generic file read routine, and uses the
- * inode->i_op->readpage() function for the actual low-level
+ * mapping->a_ops->readpage() function for the actual low-level
  * stuff.
  *
  * This is really ugly. But the goto's actually try to clarify some
diff -puN mm/filemap.c.orig~filemap-comment-fix mm/filemap.c.orig
--- 25/mm/filemap.c.orig~filemap-comment-fix	2004-03-14 14:25:01.635187048 -0800
+++ 25-akpm/mm/filemap.c.orig	2004-03-14 14:25:01.642185984 -0800
@@ -118,8 +118,10 @@ void remove_from_page_cache(struct page 
 
 static inline int sync_page(struct page *page)
 {
-	struct address_space *mapping = page->mapping;
+	struct address_space *mapping;
 
+	smp_mb();
+	mapping = page->mapping;
 	if (mapping && mapping->a_ops && mapping->a_ops->sync_page)
 		return mapping->a_ops->sync_page(page);
 	return 0;

_
