Change page->mapping handling in XFS
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
---
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]