[PATCH 8/17] jfs: use locking read_mapping_page

Nate Diller
2007-04-12T02:49:38Z

Use the new locking variant of read_mapping_page to avoid doing extra work.

Signed-off-by: Nate Diller <nate.diller@gmail.com>

---

diff -urpN -X dontdiff linux-2.6.21-rc6-mm1/fs/jfs/jfs_metapage.c linux-2.6.21-rc6-mm1-test/fs/jfs/jfs_metapage.c
--- linux-2.6.21-rc6-mm1/fs/jfs/jfs_metapage.c 2007-04-09 17:23:48.000000000 -0700
+++ linux-2.6.21-rc6-mm1-test/fs/jfs/jfs_metapage.c 2007-04-09 21:37:09.000000000 -0700
@@ -632,12 +632,11 @@ struct metapage *__get_metapage(struct i
}
SetPageUptodate(page);
} else {
- page = read_mapping_page(mapping, page_index, NULL);
- if (IS_ERR(page) || !PageUptodate(page)) {
+ page = __read_mapping_page(mapping, page_index, NULL);
+ if (IS_ERR(page)) {
jfs_err("read_mapping_page failed!");
return NULL;
}
- lock_page(page);
}

mp = page_to_mp(page, page_offset);