aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs/index.c')
-rw-r--r--fs/ntfs/index.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ntfs/index.c b/fs/ntfs/index.c
index 096c135691ae..0d645f357930 100644
--- a/fs/ntfs/index.c
+++ b/fs/ntfs/index.c
@@ -272,11 +272,11 @@ done:
272descend_into_child_node: 272descend_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 <<
279 idx_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT); 279 idx_ni->itype.index.vcn_size_bits >> PAGE_SHIFT);
280 if (IS_ERR(page)) { 280 if (IS_ERR(page)) {
281 ntfs_error(sb, "Failed to map index page, error %ld.", 281 ntfs_error(sb, "Failed to map index page, error %ld.",
282 -PTR_ERR(page)); 282 -PTR_ERR(page));
@@ -288,9 +288,9 @@ descend_into_child_node:
288fast_descend_into_child_node: 288fast_descend_into_child_node:
289 /* Get to the index allocation block. */ 289 /* Get to the index allocation block. */
290 ia = (INDEX_ALLOCATION*)(kaddr + ((vcn << 290 ia = (INDEX_ALLOCATION*)(kaddr + ((vcn <<
291 idx_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK)); 291 idx_ni->itype.index.vcn_size_bits) & ~PAGE_MASK));
292 /* Bounds checks. */ 292 /* Bounds checks. */
293 if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE) { 293 if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_SIZE) {
294 ntfs_error(sb, "Out of bounds check failed. Corrupt inode " 294 ntfs_error(sb, "Out of bounds check failed. Corrupt inode "
295 "0x%lx or driver bug.", idx_ni->mft_no); 295 "0x%lx or driver bug.", idx_ni->mft_no);
296 goto unm_err_out; 296 goto unm_err_out;
@@ -323,7 +323,7 @@ fast_descend_into_child_node:
323 goto unm_err_out; 323 goto unm_err_out;
324 } 324 }
325 index_end = (u8*)ia + idx_ni->itype.index.block_size; 325 index_end = (u8*)ia + idx_ni->itype.index.block_size;
326 if (index_end > kaddr + PAGE_CACHE_SIZE) { 326 if (index_end > kaddr + PAGE_SIZE) {
327 ntfs_error(sb, "Index buffer (VCN 0x%llx) of inode 0x%lx " 327 ntfs_error(sb, "Index buffer (VCN 0x%llx) of inode 0x%lx "
328 "crosses page boundary. Impossible! Cannot " 328 "crosses page boundary. Impossible! Cannot "
329 "access! This is probably a bug in the " 329 "access! This is probably a bug in the "
@@ -427,9 +427,9 @@ ia_done:
427 * the mapped page. 427 * the mapped page.
428 */ 428 */
429 if (old_vcn << vol->cluster_size_bits >> 429 if (old_vcn << vol->cluster_size_bits >>
430 PAGE_CACHE_SHIFT == vcn << 430 PAGE_SHIFT == vcn <<
431 vol->cluster_size_bits >> 431 vol->cluster_size_bits >>
432 PAGE_CACHE_SHIFT) 432 PAGE_SHIFT)
433 goto fast_descend_into_child_node; 433 goto fast_descend_into_child_node;
434 unlock_page(page); 434 unlock_page(page);
435 ntfs_unmap_page(page); 435 ntfs_unmap_page(page);