diff options
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r-- | fs/xfs/xfs_aops.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index d445a64b979e..e49b2406d15d 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
@@ -704,7 +704,7 @@ next_buffer: | |||
704 | 704 | ||
705 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | 705 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
706 | out_invalidate: | 706 | out_invalidate: |
707 | xfs_vm_invalidatepage(page, 0, PAGE_CACHE_SIZE); | 707 | xfs_vm_invalidatepage(page, 0, PAGE_SIZE); |
708 | return; | 708 | return; |
709 | } | 709 | } |
710 | 710 | ||
@@ -925,9 +925,9 @@ xfs_do_writepage( | |||
925 | * ---------------------------------^------------------| | 925 | * ---------------------------------^------------------| |
926 | */ | 926 | */ |
927 | offset = i_size_read(inode); | 927 | offset = i_size_read(inode); |
928 | end_index = offset >> PAGE_CACHE_SHIFT; | 928 | end_index = offset >> PAGE_SHIFT; |
929 | if (page->index < end_index) | 929 | if (page->index < end_index) |
930 | end_offset = (xfs_off_t)(page->index + 1) << PAGE_CACHE_SHIFT; | 930 | end_offset = (xfs_off_t)(page->index + 1) << PAGE_SHIFT; |
931 | else { | 931 | else { |
932 | /* | 932 | /* |
933 | * Check whether the page to write out is beyond or straddles | 933 | * Check whether the page to write out is beyond or straddles |
@@ -940,7 +940,7 @@ xfs_do_writepage( | |||
940 | * | | Straddles | | 940 | * | | Straddles | |
941 | * ---------------------------------^-----------|--------| | 941 | * ---------------------------------^-----------|--------| |
942 | */ | 942 | */ |
943 | unsigned offset_into_page = offset & (PAGE_CACHE_SIZE - 1); | 943 | unsigned offset_into_page = offset & (PAGE_SIZE - 1); |
944 | 944 | ||
945 | /* | 945 | /* |
946 | * Skip the page if it is fully outside i_size, e.g. due to a | 946 | * Skip the page if it is fully outside i_size, e.g. due to a |
@@ -971,7 +971,7 @@ xfs_do_writepage( | |||
971 | * memory is zeroed when mapped, and writes to that region are | 971 | * memory is zeroed when mapped, and writes to that region are |
972 | * not written out to the file." | 972 | * not written out to the file." |
973 | */ | 973 | */ |
974 | zero_user_segment(page, offset_into_page, PAGE_CACHE_SIZE); | 974 | zero_user_segment(page, offset_into_page, PAGE_SIZE); |
975 | 975 | ||
976 | /* Adjust the end_offset to the end of file */ | 976 | /* Adjust the end_offset to the end of file */ |
977 | end_offset = offset; | 977 | end_offset = offset; |
@@ -1475,7 +1475,7 @@ xfs_vm_write_failed( | |||
1475 | loff_t block_offset; | 1475 | loff_t block_offset; |
1476 | loff_t block_start; | 1476 | loff_t block_start; |
1477 | loff_t block_end; | 1477 | loff_t block_end; |
1478 | loff_t from = pos & (PAGE_CACHE_SIZE - 1); | 1478 | loff_t from = pos & (PAGE_SIZE - 1); |
1479 | loff_t to = from + len; | 1479 | loff_t to = from + len; |
1480 | struct buffer_head *bh, *head; | 1480 | struct buffer_head *bh, *head; |
1481 | struct xfs_mount *mp = XFS_I(inode)->i_mount; | 1481 | struct xfs_mount *mp = XFS_I(inode)->i_mount; |
@@ -1491,7 +1491,7 @@ xfs_vm_write_failed( | |||
1491 | * start of the page by using shifts rather than masks the mismatch | 1491 | * start of the page by using shifts rather than masks the mismatch |
1492 | * problem. | 1492 | * problem. |
1493 | */ | 1493 | */ |
1494 | block_offset = (pos >> PAGE_CACHE_SHIFT) << PAGE_CACHE_SHIFT; | 1494 | block_offset = (pos >> PAGE_SHIFT) << PAGE_SHIFT; |
1495 | 1495 | ||
1496 | ASSERT(block_offset + from == pos); | 1496 | ASSERT(block_offset + from == pos); |
1497 | 1497 | ||
@@ -1558,12 +1558,12 @@ xfs_vm_write_begin( | |||
1558 | struct page **pagep, | 1558 | struct page **pagep, |
1559 | void **fsdata) | 1559 | void **fsdata) |
1560 | { | 1560 | { |
1561 | pgoff_t index = pos >> PAGE_CACHE_SHIFT; | 1561 | pgoff_t index = pos >> PAGE_SHIFT; |
1562 | struct page *page; | 1562 | struct page *page; |
1563 | int status; | 1563 | int status; |
1564 | struct xfs_mount *mp = XFS_I(mapping->host)->i_mount; | 1564 | struct xfs_mount *mp = XFS_I(mapping->host)->i_mount; |
1565 | 1565 | ||
1566 | ASSERT(len <= PAGE_CACHE_SIZE); | 1566 | ASSERT(len <= PAGE_SIZE); |
1567 | 1567 | ||
1568 | page = grab_cache_page_write_begin(mapping, index, flags); | 1568 | page = grab_cache_page_write_begin(mapping, index, flags); |
1569 | if (!page) | 1569 | if (!page) |
@@ -1592,7 +1592,7 @@ xfs_vm_write_begin( | |||
1592 | truncate_pagecache_range(inode, start, pos + len); | 1592 | truncate_pagecache_range(inode, start, pos + len); |
1593 | } | 1593 | } |
1594 | 1594 | ||
1595 | page_cache_release(page); | 1595 | put_page(page); |
1596 | page = NULL; | 1596 | page = NULL; |
1597 | } | 1597 | } |
1598 | 1598 | ||
@@ -1620,7 +1620,7 @@ xfs_vm_write_end( | |||
1620 | { | 1620 | { |
1621 | int ret; | 1621 | int ret; |
1622 | 1622 | ||
1623 | ASSERT(len <= PAGE_CACHE_SIZE); | 1623 | ASSERT(len <= PAGE_SIZE); |
1624 | 1624 | ||
1625 | ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata); | 1625 | ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata); |
1626 | if (unlikely(ret < len)) { | 1626 | if (unlikely(ret < len)) { |