*/
unsigned int nr_pages = (end_vcn - start_vcn) <<
vol->cluster_size_bits >> PAGE_CACHE_SHIFT;
- unsigned int xpage, max_page, max_ofs, cur_page, cur_ofs, i;
+ unsigned int xpage, max_page, cur_page, cur_ofs, i;
unsigned int cb_clusters, cb_max_ofs;
int block, max_block, cb_max_page, bhs_size, nr_bhs, err = 0;
struct page **pages;
*/
max_page = ((VFS_I(ni)->i_size + PAGE_CACHE_SIZE - 1) >>
PAGE_CACHE_SHIFT) - offset;
- max_ofs = (VFS_I(ni)->i_size + PAGE_CACHE_SIZE - 1) & ~PAGE_CACHE_MASK;
- if (nr_pages < max_page) {
+ if (nr_pages < max_page)
max_page = nr_pages;
- max_ofs = 0;
- }
for (i = 0; i < max_page; i++, offset++) {
if (i != xpage)
pages[i] = grab_cache_page_nowait(mapping, offset);
cb_max_page >>= PAGE_CACHE_SHIFT;
/* Catch end of file inside a compression block. */
- if (cb_max_page >= max_page) {
- if (cb_max_page > max_page) {
- cb_max_page = max_page;
- cb_max_ofs = max_ofs;
- } else if (cb_max_ofs > max_ofs) {
- cb_max_ofs = max_ofs;
- }
- }
+ if (cb_max_page > max_page)
+ cb_max_page = max_page;
if (vcn == start_vcn - cb_clusters) {
/* Sparse cb, zero out page range overlapping the cb. */
if (page) {
ntfs_error(vol->sb, "Still have pages left! "
"Terminating them with extreme "
- "prejudice.");
+ "prejudice. Inode 0x%lx, page index "
+ "0x%lx.", ni->mft_no, page->index);
if (cur_page == xpage && !xpage_done)
SetPageError(page);
flush_dcache_page(page);