diff options
Diffstat (limited to 'fs/exofs/inode.c')
-rw-r--r-- | fs/exofs/inode.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index 9eaf595aeaf8..49e1bd00b4ec 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
@@ -317,7 +317,7 @@ static int read_exec(struct page_collect *pcol) | |||
317 | 317 | ||
318 | if (!pcol->ios) { | 318 | if (!pcol->ios) { |
319 | int ret = ore_get_rw_state(&pcol->sbi->layout, &oi->oc, true, | 319 | int ret = ore_get_rw_state(&pcol->sbi->layout, &oi->oc, true, |
320 | pcol->pg_first << PAGE_CACHE_SHIFT, | 320 | pcol->pg_first << PAGE_SHIFT, |
321 | pcol->length, &pcol->ios); | 321 | pcol->length, &pcol->ios); |
322 | 322 | ||
323 | if (ret) | 323 | if (ret) |
@@ -383,7 +383,7 @@ static int readpage_strip(void *data, struct page *page) | |||
383 | struct inode *inode = pcol->inode; | 383 | struct inode *inode = pcol->inode; |
384 | struct exofs_i_info *oi = exofs_i(inode); | 384 | struct exofs_i_info *oi = exofs_i(inode); |
385 | loff_t i_size = i_size_read(inode); | 385 | loff_t i_size = i_size_read(inode); |
386 | pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT; | 386 | pgoff_t end_index = i_size >> PAGE_SHIFT; |
387 | size_t len; | 387 | size_t len; |
388 | int ret; | 388 | int ret; |
389 | 389 | ||
@@ -397,9 +397,9 @@ static int readpage_strip(void *data, struct page *page) | |||
397 | pcol->that_locked_page = page; | 397 | pcol->that_locked_page = page; |
398 | 398 | ||
399 | if (page->index < end_index) | 399 | if (page->index < end_index) |
400 | len = PAGE_CACHE_SIZE; | 400 | len = PAGE_SIZE; |
401 | else if (page->index == end_index) | 401 | else if (page->index == end_index) |
402 | len = i_size & ~PAGE_CACHE_MASK; | 402 | len = i_size & ~PAGE_MASK; |
403 | else | 403 | else |
404 | len = 0; | 404 | len = 0; |
405 | 405 | ||
@@ -442,8 +442,8 @@ try_again: | |||
442 | goto fail; | 442 | goto fail; |
443 | } | 443 | } |
444 | 444 | ||
445 | if (len != PAGE_CACHE_SIZE) | 445 | if (len != PAGE_SIZE) |
446 | zero_user(page, len, PAGE_CACHE_SIZE - len); | 446 | zero_user(page, len, PAGE_SIZE - len); |
447 | 447 | ||
448 | EXOFS_DBGMSG2(" readpage_strip(0x%lx, 0x%lx) len=0x%zx\n", | 448 | EXOFS_DBGMSG2(" readpage_strip(0x%lx, 0x%lx) len=0x%zx\n", |
449 | inode->i_ino, page->index, len); | 449 | inode->i_ino, page->index, len); |
@@ -609,7 +609,7 @@ static void __r4w_put_page(void *priv, struct page *page) | |||
609 | 609 | ||
610 | if ((pcol->that_locked_page != page) && (ZERO_PAGE(0) != page)) { | 610 | if ((pcol->that_locked_page != page) && (ZERO_PAGE(0) != page)) { |
611 | EXOFS_DBGMSG2("index=0x%lx\n", page->index); | 611 | EXOFS_DBGMSG2("index=0x%lx\n", page->index); |
612 | page_cache_release(page); | 612 | put_page(page); |
613 | return; | 613 | return; |
614 | } | 614 | } |
615 | EXOFS_DBGMSG2("that_locked_page index=0x%lx\n", | 615 | EXOFS_DBGMSG2("that_locked_page index=0x%lx\n", |
@@ -633,7 +633,7 @@ static int write_exec(struct page_collect *pcol) | |||
633 | 633 | ||
634 | BUG_ON(pcol->ios); | 634 | BUG_ON(pcol->ios); |
635 | ret = ore_get_rw_state(&pcol->sbi->layout, &oi->oc, false, | 635 | ret = ore_get_rw_state(&pcol->sbi->layout, &oi->oc, false, |
636 | pcol->pg_first << PAGE_CACHE_SHIFT, | 636 | pcol->pg_first << PAGE_SHIFT, |
637 | pcol->length, &pcol->ios); | 637 | pcol->length, &pcol->ios); |
638 | if (unlikely(ret)) | 638 | if (unlikely(ret)) |
639 | goto err; | 639 | goto err; |
@@ -696,7 +696,7 @@ static int writepage_strip(struct page *page, | |||
696 | struct inode *inode = pcol->inode; | 696 | struct inode *inode = pcol->inode; |
697 | struct exofs_i_info *oi = exofs_i(inode); | 697 | struct exofs_i_info *oi = exofs_i(inode); |
698 | loff_t i_size = i_size_read(inode); | 698 | loff_t i_size = i_size_read(inode); |
699 | pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT; | 699 | pgoff_t end_index = i_size >> PAGE_SHIFT; |
700 | size_t len; | 700 | size_t len; |
701 | int ret; | 701 | int ret; |
702 | 702 | ||
@@ -708,9 +708,9 @@ static int writepage_strip(struct page *page, | |||
708 | 708 | ||
709 | if (page->index < end_index) | 709 | if (page->index < end_index) |
710 | /* in this case, the page is within the limits of the file */ | 710 | /* in this case, the page is within the limits of the file */ |
711 | len = PAGE_CACHE_SIZE; | 711 | len = PAGE_SIZE; |
712 | else { | 712 | else { |
713 | len = i_size & ~PAGE_CACHE_MASK; | 713 | len = i_size & ~PAGE_MASK; |
714 | 714 | ||
715 | if (page->index > end_index || !len) { | 715 | if (page->index > end_index || !len) { |
716 | /* in this case, the page is outside the limits | 716 | /* in this case, the page is outside the limits |
@@ -790,10 +790,10 @@ static int exofs_writepages(struct address_space *mapping, | |||
790 | long start, end, expected_pages; | 790 | long start, end, expected_pages; |
791 | int ret; | 791 | int ret; |
792 | 792 | ||
793 | start = wbc->range_start >> PAGE_CACHE_SHIFT; | 793 | start = wbc->range_start >> PAGE_SHIFT; |
794 | end = (wbc->range_end == LLONG_MAX) ? | 794 | end = (wbc->range_end == LLONG_MAX) ? |
795 | start + mapping->nrpages : | 795 | start + mapping->nrpages : |
796 | wbc->range_end >> PAGE_CACHE_SHIFT; | 796 | wbc->range_end >> PAGE_SHIFT; |
797 | 797 | ||
798 | if (start || end) | 798 | if (start || end) |
799 | expected_pages = end - start + 1; | 799 | expected_pages = end - start + 1; |
@@ -881,15 +881,15 @@ int exofs_write_begin(struct file *file, struct address_space *mapping, | |||
881 | } | 881 | } |
882 | 882 | ||
883 | /* read modify write */ | 883 | /* read modify write */ |
884 | if (!PageUptodate(page) && (len != PAGE_CACHE_SIZE)) { | 884 | if (!PageUptodate(page) && (len != PAGE_SIZE)) { |
885 | loff_t i_size = i_size_read(mapping->host); | 885 | loff_t i_size = i_size_read(mapping->host); |
886 | pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT; | 886 | pgoff_t end_index = i_size >> PAGE_SHIFT; |
887 | size_t rlen; | 887 | size_t rlen; |
888 | 888 | ||
889 | if (page->index < end_index) | 889 | if (page->index < end_index) |
890 | rlen = PAGE_CACHE_SIZE; | 890 | rlen = PAGE_SIZE; |
891 | else if (page->index == end_index) | 891 | else if (page->index == end_index) |
892 | rlen = i_size & ~PAGE_CACHE_MASK; | 892 | rlen = i_size & ~PAGE_MASK; |
893 | else | 893 | else |
894 | rlen = 0; | 894 | rlen = 0; |
895 | 895 | ||