lkml.org 
[lkml]   [2007]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] add page->mapping handling interface [35/35] changes in XFS
Change page->mapping handling in XFS

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>


---
fs/xfs/linux-2.6/xfs_aops.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: test-2.6.23-rc4-mm1/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- test-2.6.23-rc4-mm1.orig/fs/xfs/linux-2.6/xfs_aops.c
+++ test-2.6.23-rc4-mm1/fs/xfs/linux-2.6/xfs_aops.c
@@ -595,7 +595,7 @@ xfs_probe_page(
if (PageWriteback(page))
return 0;

- if (page->mapping && PageDirty(page)) {
+ if (page_mapping_cache(page) && PageDirty(page)) {
if (page_has_buffers(page)) {
struct buffer_head *bh, *head;

@@ -697,7 +697,7 @@ xfs_is_delayed_page(
if (PageWriteback(page))
return 0;

- if (page->mapping && page_has_buffers(page)) {
+ if (page_mapping_cache(page) && page_has_buffers(page)) {
struct buffer_head *bh, *head;
int acceptable = 0;

@@ -752,7 +752,7 @@ xfs_convert_page(
goto fail;
if (PageWriteback(page))
goto fail_unlock_page;
- if (page->mapping != inode->i_mapping)
+ if (pagecache_consistent(page, inode->i_mapping))
goto fail_unlock_page;
if (!xfs_is_delayed_page(page, (*ioendp)->io_type))
goto fail_unlock_page;
@@ -1178,7 +1178,7 @@ xfs_vm_writepage(
int error;
int need_trans;
int delalloc, unmapped, unwritten;
- struct inode *inode = page->mapping->host;
+ struct inode *inode = page_inode(page);

xfs_page_trace(XFS_WRITEPAGE_ENTER, inode, page, 0);

@@ -1270,7 +1270,7 @@ xfs_vm_releasepage(
struct page *page,
gfp_t gfp_mask)
{
- struct inode *inode = page->mapping->host;
+ struct inode *inode = page_inode(page);
int dirty, delalloc, unmapped, unwritten;
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL,
@@ -1562,7 +1562,7 @@ xfs_vm_invalidatepage(
unsigned long offset)
{
xfs_page_trace(XFS_INVALIDPAGE_ENTER,
- page->mapping->host, page, offset);
+ page_inode(page), page, offset);
block_invalidatepage(page, offset);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-10 12:39    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site