[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070910192505.f8832cfe.kamezawa.hiroyu@jp.fujitsu.com>
Date: Mon, 10 Sep 2007 19:25:05 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: mark.fasheh@...cle.com, LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"nickpiggin@...oo.com.au" <nickpiggin@...oo.com.au>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: [PATCH] add page->mapping handling interface [28/35] changes in
OCFS2
Changes page->mapping handling in OCFS2
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
---
fs/ocfs2/aops.c | 8 ++++----
fs/ocfs2/mmap.c | 3 ++-
2 files changed, 6 insertions(+), 5 deletions(-)
Index: test-2.6.23-rc4-mm1/fs/ocfs2/aops.c
===================================================================
--- test-2.6.23-rc4-mm1.orig/fs/ocfs2/aops.c
+++ test-2.6.23-rc4-mm1/fs/ocfs2/aops.c
@@ -208,7 +208,7 @@ bail:
static int ocfs2_readpage(struct file *file, struct page *page)
{
- struct inode *inode = page->mapping->host;
+ struct inode *inode = page_inode(page);
loff_t start = (loff_t)page->index << PAGE_CACHE_SHIFT;
int ret, unlock = 1;
@@ -540,14 +540,14 @@ static void ocfs2_dio_end_io(struct kioc
*/
static void ocfs2_invalidatepage(struct page *page, unsigned long offset)
{
- journal_t *journal = OCFS2_SB(page->mapping->host->i_sb)->journal->j_journal;
+ journal_t *journal = OCFS2_SB(page_inode(page)->i_sb)->journal->j_journal;
journal_invalidatepage(journal, page, offset);
}
static int ocfs2_releasepage(struct page *page, gfp_t wait)
{
- journal_t *journal = OCFS2_SB(page->mapping->host->i_sb)->journal->j_journal;
+ journal_t *journal = OCFS2_SB(page_inode(page)->i_sb)->journal->j_journal;
if (!page_has_buffers(page))
return 0;
@@ -1065,7 +1065,7 @@ static int ocfs2_grab_pages_for_write(st
*/
lock_page(mmap_page);
- if (mmap_page->mapping != mapping) {
+ if (!pagecache_consistent(mmap_page, mapping)) {
unlock_page(mmap_page);
/*
* Sanity check - the locking in
Index: test-2.6.23-rc4-mm1/fs/ocfs2/mmap.c
===================================================================
--- test-2.6.23-rc4-mm1.orig/fs/ocfs2/mmap.c
+++ test-2.6.23-rc4-mm1/fs/ocfs2/mmap.c
@@ -112,7 +112,8 @@ static int __ocfs2_page_mkwrite(struct i
* page mapping after taking the page lock inside of
* ocfs2_write_begin_nolock().
*/
- if (!PageUptodate(page) || page->mapping != inode->i_mapping) {
+ if (!PageUptodate(page) ||
+ !pagecache_consistent(page, inode->i_mapping)) {
ret = -EINVAL;
goto out;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists