diff options
| author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2016-04-01 08:29:48 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-04 13:41:08 -0400 |
| commit | ea1754a084760e68886f5b725c8eaada9cc57155 (patch) | |
| tree | 2e14936a959a661ee68d4490cb9b82b94bb27ab9 /fs/ntfs | |
| parent | 09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a (diff) | |
mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage
Mostly direct substitution with occasional adjustment or removing
outdated comments.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ntfs')
| -rw-r--r-- | fs/ntfs/aops.c | 2 | ||||
| -rw-r--r-- | fs/ntfs/aops.h | 2 | ||||
| -rw-r--r-- | fs/ntfs/compress.c | 21 | ||||
| -rw-r--r-- | fs/ntfs/dir.c | 16 | ||||
| -rw-r--r-- | fs/ntfs/file.c | 2 | ||||
| -rw-r--r-- | fs/ntfs/index.c | 2 | ||||
| -rw-r--r-- | fs/ntfs/inode.c | 4 | ||||
| -rw-r--r-- | fs/ntfs/super.c | 14 |
8 files changed, 27 insertions, 36 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index a474e7ef92ea..97768a1379f2 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c | |||
| @@ -674,7 +674,7 @@ static int ntfs_write_block(struct page *page, struct writeback_control *wbc) | |||
| 674 | // in the inode. | 674 | // in the inode. |
| 675 | // Again, for each page do: | 675 | // Again, for each page do: |
| 676 | // __set_page_dirty_buffers(); | 676 | // __set_page_dirty_buffers(); |
| 677 | // page_cache_release() | 677 | // put_page() |
| 678 | // We don't need to wait on the writes. | 678 | // We don't need to wait on the writes. |
| 679 | // Update iblock. | 679 | // Update iblock. |
| 680 | } | 680 | } |
diff --git a/fs/ntfs/aops.h b/fs/ntfs/aops.h index 37cd7e45dcbc..820d6eabf60f 100644 --- a/fs/ntfs/aops.h +++ b/fs/ntfs/aops.h | |||
| @@ -49,7 +49,7 @@ static inline void ntfs_unmap_page(struct page *page) | |||
| 49 | * @index: index into the page cache for @mapping of the page to map | 49 | * @index: index into the page cache for @mapping of the page to map |
| 50 | * | 50 | * |
| 51 | * Read a page from the page cache of the address space @mapping at position | 51 | * Read a page from the page cache of the address space @mapping at position |
| 52 | * @index, where @index is in units of PAGE_CACHE_SIZE, and not in bytes. | 52 | * @index, where @index is in units of PAGE_SIZE, and not in bytes. |
| 53 | * | 53 | * |
| 54 | * If the page is not in memory it is loaded from disk first using the readpage | 54 | * If the page is not in memory it is loaded from disk first using the readpage |
| 55 | * method defined in the address space operations of @mapping and the page is | 55 | * method defined in the address space operations of @mapping and the page is |
diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index b6074a56661b..f2b5e746f49b 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c | |||
| @@ -105,10 +105,6 @@ static void zero_partial_compressed_page(struct page *page, | |||
| 105 | 105 | ||
| 106 | ntfs_debug("Zeroing page region outside initialized size."); | 106 | ntfs_debug("Zeroing page region outside initialized size."); |
| 107 | if (((s64)page->index << PAGE_SHIFT) >= initialized_size) { | 107 | if (((s64)page->index << PAGE_SHIFT) >= initialized_size) { |
| 108 | /* | ||
| 109 | * FIXME: Using clear_page() will become wrong when we get | ||
| 110 | * PAGE_CACHE_SIZE != PAGE_SIZE but for now there is no problem. | ||
| 111 | */ | ||
| 112 | clear_page(kp); | 108 | clear_page(kp); |
| 113 | return; | 109 | return; |
| 114 | } | 110 | } |
| @@ -160,7 +156,7 @@ static inline void handle_bounds_compressed_page(struct page *page, | |||
| 160 | * @xpage_done indicates whether the target page (@dest_pages[@xpage]) was | 156 | * @xpage_done indicates whether the target page (@dest_pages[@xpage]) was |
| 161 | * completed during the decompression of the compression block (@cb_start). | 157 | * completed during the decompression of the compression block (@cb_start). |
| 162 | * | 158 | * |
| 163 | * Warning: This function *REQUIRES* PAGE_CACHE_SIZE >= 4096 or it will blow up | 159 | * Warning: This function *REQUIRES* PAGE_SIZE >= 4096 or it will blow up |
| 164 | * unpredicatbly! You have been warned! | 160 | * unpredicatbly! You have been warned! |
| 165 | * | 161 | * |
| 166 | * Note to hackers: This function may not sleep until it has finished accessing | 162 | * Note to hackers: This function may not sleep until it has finished accessing |
| @@ -462,7 +458,7 @@ return_overflow: | |||
| 462 | * have been written to so that we would lose data if we were to just overwrite | 458 | * have been written to so that we would lose data if we were to just overwrite |
| 463 | * them with the out-of-date uncompressed data. | 459 | * them with the out-of-date uncompressed data. |
| 464 | * | 460 | * |
| 465 | * FIXME: For PAGE_CACHE_SIZE > cb_size we are not doing the Right Thing(TM) at | 461 | * FIXME: For PAGE_SIZE > cb_size we are not doing the Right Thing(TM) at |
| 466 | * the end of the file I think. We need to detect this case and zero the out | 462 | * the end of the file I think. We need to detect this case and zero the out |
| 467 | * of bounds remainder of the page in question and mark it as handled. At the | 463 | * of bounds remainder of the page in question and mark it as handled. At the |
| 468 | * moment we would just return -EIO on such a page. This bug will only become | 464 | * moment we would just return -EIO on such a page. This bug will only become |
| @@ -470,7 +466,7 @@ return_overflow: | |||
| 470 | * clusters so is probably not going to be seen by anyone. Still this should | 466 | * clusters so is probably not going to be seen by anyone. Still this should |
| 471 | * be fixed. (AIA) | 467 | * be fixed. (AIA) |
| 472 | * | 468 | * |
| 473 | * FIXME: Again for PAGE_CACHE_SIZE > cb_size we are screwing up both in | 469 | * FIXME: Again for PAGE_SIZE > cb_size we are screwing up both in |
| 474 | * handling sparse and compressed cbs. (AIA) | 470 | * handling sparse and compressed cbs. (AIA) |
| 475 | * | 471 | * |
| 476 | * FIXME: At the moment we don't do any zeroing out in the case that | 472 | * FIXME: At the moment we don't do any zeroing out in the case that |
| @@ -497,12 +493,12 @@ int ntfs_read_compressed_block(struct page *page) | |||
| 497 | u64 cb_size_mask = cb_size - 1UL; | 493 | u64 cb_size_mask = cb_size - 1UL; |
| 498 | VCN vcn; | 494 | VCN vcn; |
| 499 | LCN lcn; | 495 | LCN lcn; |
| 500 | /* The first wanted vcn (minimum alignment is PAGE_CACHE_SIZE). */ | 496 | /* The first wanted vcn (minimum alignment is PAGE_SIZE). */ |
| 501 | VCN start_vcn = (((s64)index << PAGE_SHIFT) & ~cb_size_mask) >> | 497 | VCN start_vcn = (((s64)index << PAGE_SHIFT) & ~cb_size_mask) >> |
| 502 | vol->cluster_size_bits; | 498 | vol->cluster_size_bits; |
| 503 | /* | 499 | /* |
| 504 | * The first vcn after the last wanted vcn (minimum alignment is again | 500 | * The first vcn after the last wanted vcn (minimum alignment is again |
| 505 | * PAGE_CACHE_SIZE. | 501 | * PAGE_SIZE. |
| 506 | */ | 502 | */ |
| 507 | VCN end_vcn = ((((s64)(index + 1UL) << PAGE_SHIFT) + cb_size - 1) | 503 | VCN end_vcn = ((((s64)(index + 1UL) << PAGE_SHIFT) + cb_size - 1) |
| 508 | & ~cb_size_mask) >> vol->cluster_size_bits; | 504 | & ~cb_size_mask) >> vol->cluster_size_bits; |
| @@ -753,11 +749,6 @@ lock_retry_remap: | |||
| 753 | for (; cur_page < cb_max_page; cur_page++) { | 749 | for (; cur_page < cb_max_page; cur_page++) { |
| 754 | page = pages[cur_page]; | 750 | page = pages[cur_page]; |
| 755 | if (page) { | 751 | if (page) { |
| 756 | /* | ||
| 757 | * FIXME: Using clear_page() will become wrong | ||
| 758 | * when we get PAGE_CACHE_SIZE != PAGE_SIZE but | ||
| 759 | * for now there is no problem. | ||
| 760 | */ | ||
| 761 | if (likely(!cur_ofs)) | 752 | if (likely(!cur_ofs)) |
| 762 | clear_page(page_address(page)); | 753 | clear_page(page_address(page)); |
| 763 | else | 754 | else |
| @@ -807,7 +798,7 @@ lock_retry_remap: | |||
| 807 | * synchronous io for the majority of pages. | 798 | * synchronous io for the majority of pages. |
| 808 | * Or if we choose not to do the read-ahead/-behind stuff, we | 799 | * Or if we choose not to do the read-ahead/-behind stuff, we |
| 809 | * could just return block_read_full_page(pages[xpage]) as long | 800 | * could just return block_read_full_page(pages[xpage]) as long |
| 810 | * as PAGE_CACHE_SIZE <= cb_size. | 801 | * as PAGE_SIZE <= cb_size. |
| 811 | */ | 802 | */ |
| 812 | if (cb_max_ofs) | 803 | if (cb_max_ofs) |
| 813 | cb_max_page--; | 804 | cb_max_page--; |
diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c index 3cdce162592d..a18613579001 100644 --- a/fs/ntfs/dir.c +++ b/fs/ntfs/dir.c | |||
| @@ -315,7 +315,7 @@ found_it: | |||
| 315 | descend_into_child_node: | 315 | descend_into_child_node: |
| 316 | /* | 316 | /* |
| 317 | * Convert vcn to index into the index allocation attribute in units | 317 | * Convert vcn to index into the index allocation attribute in units |
| 318 | * of PAGE_CACHE_SIZE and map the page cache page, reading it from | 318 | * of PAGE_SIZE and map the page cache page, reading it from |
| 319 | * disk if necessary. | 319 | * disk if necessary. |
| 320 | */ | 320 | */ |
| 321 | page = ntfs_map_page(ia_mapping, vcn << | 321 | page = ntfs_map_page(ia_mapping, vcn << |
| @@ -793,11 +793,11 @@ found_it: | |||
| 793 | descend_into_child_node: | 793 | descend_into_child_node: |
| 794 | /* | 794 | /* |
| 795 | * Convert vcn to index into the index allocation attribute in units | 795 | * Convert vcn to index into the index allocation attribute in units |
| 796 | * of PAGE_CACHE_SIZE and map the page cache page, reading it from | 796 | * of PAGE_SIZE and map the page cache page, reading it from |
| 797 | * disk if necessary. | 797 | * disk if necessary. |
| 798 | */ | 798 | */ |
| 799 | page = ntfs_map_page(ia_mapping, vcn << | 799 | page = ntfs_map_page(ia_mapping, vcn << |
| 800 | dir_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT); | 800 | dir_ni->itype.index.vcn_size_bits >> PAGE_SHIFT); |
| 801 | if (IS_ERR(page)) { | 801 | if (IS_ERR(page)) { |
| 802 | ntfs_error(sb, "Failed to map directory index page, error %ld.", | 802 | ntfs_error(sb, "Failed to map directory index page, error %ld.", |
| 803 | -PTR_ERR(page)); | 803 | -PTR_ERR(page)); |
| @@ -809,9 +809,9 @@ descend_into_child_node: | |||
| 809 | fast_descend_into_child_node: | 809 | fast_descend_into_child_node: |
| 810 | /* Get to the index allocation block. */ | 810 | /* Get to the index allocation block. */ |
| 811 | ia = (INDEX_ALLOCATION*)(kaddr + ((vcn << | 811 | ia = (INDEX_ALLOCATION*)(kaddr + ((vcn << |
| 812 | dir_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK)); | 812 | dir_ni->itype.index.vcn_size_bits) & ~PAGE_MASK)); |
| 813 | /* Bounds checks. */ | 813 | /* Bounds checks. */ |
| 814 | if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE) { | 814 | if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_SIZE) { |
| 815 | ntfs_error(sb, "Out of bounds check failed. Corrupt directory " | 815 | ntfs_error(sb, "Out of bounds check failed. Corrupt directory " |
| 816 | "inode 0x%lx or driver bug.", dir_ni->mft_no); | 816 | "inode 0x%lx or driver bug.", dir_ni->mft_no); |
| 817 | goto unm_err_out; | 817 | goto unm_err_out; |
| @@ -844,7 +844,7 @@ fast_descend_into_child_node: | |||
| 844 | goto unm_err_out; | 844 | goto unm_err_out; |
| 845 | } | 845 | } |
| 846 | index_end = (u8*)ia + dir_ni->itype.index.block_size; | 846 | index_end = (u8*)ia + dir_ni->itype.index.block_size; |
| 847 | if (index_end > kaddr + PAGE_CACHE_SIZE) { | 847 | if (index_end > kaddr + PAGE_SIZE) { |
| 848 | ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode " | 848 | ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode " |
| 849 | "0x%lx crosses page boundary. Impossible! " | 849 | "0x%lx crosses page boundary. Impossible! " |
| 850 | "Cannot access! This is probably a bug in the " | 850 | "Cannot access! This is probably a bug in the " |
| @@ -968,9 +968,9 @@ found_it2: | |||
| 968 | /* If vcn is in the same page cache page as old_vcn we | 968 | /* If vcn is in the same page cache page as old_vcn we |
| 969 | * recycle the mapped page. */ | 969 | * recycle the mapped page. */ |
| 970 | if (old_vcn << vol->cluster_size_bits >> | 970 | if (old_vcn << vol->cluster_size_bits >> |
| 971 | PAGE_CACHE_SHIFT == vcn << | 971 | PAGE_SHIFT == vcn << |
| 972 | vol->cluster_size_bits >> | 972 | vol->cluster_size_bits >> |
| 973 | PAGE_CACHE_SHIFT) | 973 | PAGE_SHIFT) |
| 974 | goto fast_descend_into_child_node; | 974 | goto fast_descend_into_child_node; |
| 975 | unlock_page(page); | 975 | unlock_page(page); |
| 976 | ntfs_unmap_page(page); | 976 | ntfs_unmap_page(page); |
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index 2dae60857544..91117ada8528 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
| @@ -573,7 +573,7 @@ static inline int ntfs_submit_bh_for_read(struct buffer_head *bh) | |||
| 573 | * only partially being written to. | 573 | * only partially being written to. |
| 574 | * | 574 | * |
| 575 | * If @nr_pages is greater than one, we are guaranteed that the cluster size is | 575 | * If @nr_pages is greater than one, we are guaranteed that the cluster size is |
| 576 | * greater than PAGE_CACHE_SIZE, that all pages in @pages are entirely inside | 576 | * greater than PAGE_SIZE, that all pages in @pages are entirely inside |
| 577 | * the same cluster and that they are the entirety of that cluster, and that | 577 | * the same cluster and that they are the entirety of that cluster, and that |
| 578 | * the cluster is sparse, i.e. we need to allocate a cluster to fill the hole. | 578 | * the cluster is sparse, i.e. we need to allocate a cluster to fill the hole. |
| 579 | * | 579 | * |
diff --git a/fs/ntfs/index.c b/fs/ntfs/index.c index 02a83a46ead2..0d645f357930 100644 --- a/fs/ntfs/index.c +++ b/fs/ntfs/index.c | |||
| @@ -272,7 +272,7 @@ done: | |||
| 272 | descend_into_child_node: | 272 | descend_into_child_node: |
| 273 | /* | 273 | /* |
| 274 | * Convert vcn to index into the index allocation attribute in units | 274 | * Convert vcn to index into the index allocation attribute in units |
| 275 | * of PAGE_CACHE_SIZE and map the page cache page, reading it from | 275 | * of PAGE_SIZE and map the page cache page, reading it from |
| 276 | * disk if necessary. | 276 | * disk if necessary. |
| 277 | */ | 277 | */ |
| 278 | page = ntfs_map_page(ia_mapping, vcn << | 278 | page = ntfs_map_page(ia_mapping, vcn << |
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index 3eda6d4bcc65..f40972d6df90 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c | |||
| @@ -870,7 +870,7 @@ skip_attr_list_load: | |||
| 870 | } | 870 | } |
| 871 | if (ni->itype.index.block_size > PAGE_SIZE) { | 871 | if (ni->itype.index.block_size > PAGE_SIZE) { |
| 872 | ntfs_error(vi->i_sb, "Index block size (%u) > " | 872 | ntfs_error(vi->i_sb, "Index block size (%u) > " |
| 873 | "PAGE_CACHE_SIZE (%ld) is not " | 873 | "PAGE_SIZE (%ld) is not " |
| 874 | "supported. Sorry.", | 874 | "supported. Sorry.", |
| 875 | ni->itype.index.block_size, | 875 | ni->itype.index.block_size, |
| 876 | PAGE_SIZE); | 876 | PAGE_SIZE); |
| @@ -1586,7 +1586,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) | |||
| 1586 | goto unm_err_out; | 1586 | goto unm_err_out; |
| 1587 | } | 1587 | } |
| 1588 | if (ni->itype.index.block_size > PAGE_SIZE) { | 1588 | if (ni->itype.index.block_size > PAGE_SIZE) { |
| 1589 | ntfs_error(vi->i_sb, "Index block size (%u) > PAGE_CACHE_SIZE " | 1589 | ntfs_error(vi->i_sb, "Index block size (%u) > PAGE_SIZE " |
| 1590 | "(%ld) is not supported. Sorry.", | 1590 | "(%ld) is not supported. Sorry.", |
| 1591 | ni->itype.index.block_size, PAGE_SIZE); | 1591 | ni->itype.index.block_size, PAGE_SIZE); |
| 1592 | err = -EOPNOTSUPP; | 1592 | err = -EOPNOTSUPP; |
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index ab2b0930054e..ecb49870a680 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
| @@ -823,12 +823,12 @@ static bool parse_ntfs_boot_sector(ntfs_volume *vol, const NTFS_BOOT_SECTOR *b) | |||
| 823 | ntfs_debug("vol->mft_record_size_bits = %i (0x%x)", | 823 | ntfs_debug("vol->mft_record_size_bits = %i (0x%x)", |
| 824 | vol->mft_record_size_bits, vol->mft_record_size_bits); | 824 | vol->mft_record_size_bits, vol->mft_record_size_bits); |
| 825 | /* | 825 | /* |
| 826 | * We cannot support mft record sizes above the PAGE_CACHE_SIZE since | 826 | * We cannot support mft record sizes above the PAGE_SIZE since |
| 827 | * we store $MFT/$DATA, the table of mft records in the page cache. | 827 | * we store $MFT/$DATA, the table of mft records in the page cache. |
| 828 | */ | 828 | */ |
| 829 | if (vol->mft_record_size > PAGE_SIZE) { | 829 | if (vol->mft_record_size > PAGE_SIZE) { |
| 830 | ntfs_error(vol->sb, "Mft record size (%i) exceeds the " | 830 | ntfs_error(vol->sb, "Mft record size (%i) exceeds the " |
| 831 | "PAGE_CACHE_SIZE on your system (%lu). " | 831 | "PAGE_SIZE on your system (%lu). " |
| 832 | "This is not supported. Sorry.", | 832 | "This is not supported. Sorry.", |
| 833 | vol->mft_record_size, PAGE_SIZE); | 833 | vol->mft_record_size, PAGE_SIZE); |
| 834 | return false; | 834 | return false; |
| @@ -2471,12 +2471,12 @@ static s64 get_nr_free_clusters(ntfs_volume *vol) | |||
| 2471 | down_read(&vol->lcnbmp_lock); | 2471 | down_read(&vol->lcnbmp_lock); |
| 2472 | /* | 2472 | /* |
| 2473 | * Convert the number of bits into bytes rounded up, then convert into | 2473 | * Convert the number of bits into bytes rounded up, then convert into |
| 2474 | * multiples of PAGE_CACHE_SIZE, rounding up so that if we have one | 2474 | * multiples of PAGE_SIZE, rounding up so that if we have one |
| 2475 | * full and one partial page max_index = 2. | 2475 | * full and one partial page max_index = 2. |
| 2476 | */ | 2476 | */ |
| 2477 | max_index = (((vol->nr_clusters + 7) >> 3) + PAGE_SIZE - 1) >> | 2477 | max_index = (((vol->nr_clusters + 7) >> 3) + PAGE_SIZE - 1) >> |
| 2478 | PAGE_SHIFT; | 2478 | PAGE_SHIFT; |
| 2479 | /* Use multiples of 4 bytes, thus max_size is PAGE_CACHE_SIZE / 4. */ | 2479 | /* Use multiples of 4 bytes, thus max_size is PAGE_SIZE / 4. */ |
| 2480 | ntfs_debug("Reading $Bitmap, max_index = 0x%lx, max_size = 0x%lx.", | 2480 | ntfs_debug("Reading $Bitmap, max_index = 0x%lx, max_size = 0x%lx.", |
| 2481 | max_index, PAGE_SIZE / 4); | 2481 | max_index, PAGE_SIZE / 4); |
| 2482 | for (index = 0; index < max_index; index++) { | 2482 | for (index = 0; index < max_index; index++) { |
| @@ -2547,7 +2547,7 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, | |||
| 2547 | pgoff_t index; | 2547 | pgoff_t index; |
| 2548 | 2548 | ||
| 2549 | ntfs_debug("Entering."); | 2549 | ntfs_debug("Entering."); |
| 2550 | /* Use multiples of 4 bytes, thus max_size is PAGE_CACHE_SIZE / 4. */ | 2550 | /* Use multiples of 4 bytes, thus max_size is PAGE_SIZE / 4. */ |
| 2551 | ntfs_debug("Reading $MFT/$BITMAP, max_index = 0x%lx, max_size = " | 2551 | ntfs_debug("Reading $MFT/$BITMAP, max_index = 0x%lx, max_size = " |
| 2552 | "0x%lx.", max_index, PAGE_SIZE / 4); | 2552 | "0x%lx.", max_index, PAGE_SIZE / 4); |
| 2553 | for (index = 0; index < max_index; index++) { | 2553 | for (index = 0; index < max_index; index++) { |
| @@ -2639,7 +2639,7 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs) | |||
| 2639 | size = i_size_read(vol->mft_ino) >> vol->mft_record_size_bits; | 2639 | size = i_size_read(vol->mft_ino) >> vol->mft_record_size_bits; |
| 2640 | /* | 2640 | /* |
| 2641 | * Convert the maximum number of set bits into bytes rounded up, then | 2641 | * Convert the maximum number of set bits into bytes rounded up, then |
| 2642 | * convert into multiples of PAGE_CACHE_SIZE, rounding up so that if we | 2642 | * convert into multiples of PAGE_SIZE, rounding up so that if we |
| 2643 | * have one full and one partial page max_index = 2. | 2643 | * have one full and one partial page max_index = 2. |
| 2644 | */ | 2644 | */ |
| 2645 | max_index = ((((mft_ni->initialized_size >> vol->mft_record_size_bits) | 2645 | max_index = ((((mft_ni->initialized_size >> vol->mft_record_size_bits) |
| @@ -2765,7 +2765,7 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) | |||
| 2765 | if (!parse_options(vol, (char*)opt)) | 2765 | if (!parse_options(vol, (char*)opt)) |
| 2766 | goto err_out_now; | 2766 | goto err_out_now; |
| 2767 | 2767 | ||
| 2768 | /* We support sector sizes up to the PAGE_CACHE_SIZE. */ | 2768 | /* We support sector sizes up to the PAGE_SIZE. */ |
| 2769 | if (bdev_logical_block_size(sb->s_bdev) > PAGE_SIZE) { | 2769 | if (bdev_logical_block_size(sb->s_bdev) > PAGE_SIZE) { |
| 2770 | if (!silent) | 2770 | if (!silent) |
| 2771 | ntfs_error(sb, "Device has unsupported sector size " | 2771 | ntfs_error(sb, "Device has unsupported sector size " |
