aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs/file.c')
-rw-r--r--fs/ntfs/file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index fb413d3d861..5027d3d1b3f 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * file.c - NTFS kernel file operations. Part of the Linux-NTFS project. 2 * file.c - NTFS kernel file operations. Part of the Linux-NTFS project.
3 * 3 *
4 * Copyright (c) 2001-2005 Anton Altaparmakov 4 * Copyright (c) 2001-2006 Anton Altaparmakov
5 * 5 *
6 * This program/include file is free software; you can redistribute it and/or 6 * This program/include file is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as published 7 * modify it under the terms of the GNU General Public License as published
@@ -248,7 +248,7 @@ do_non_resident_extend:
248 * enough to make ntfs_writepage() work. 248 * enough to make ntfs_writepage() work.
249 */ 249 */
250 write_lock_irqsave(&ni->size_lock, flags); 250 write_lock_irqsave(&ni->size_lock, flags);
251 ni->initialized_size = (index + 1) << PAGE_CACHE_SHIFT; 251 ni->initialized_size = (s64)(index + 1) << PAGE_CACHE_SHIFT;
252 if (ni->initialized_size > new_init_size) 252 if (ni->initialized_size > new_init_size)
253 ni->initialized_size = new_init_size; 253 ni->initialized_size = new_init_size;
254 write_unlock_irqrestore(&ni->size_lock, flags); 254 write_unlock_irqrestore(&ni->size_lock, flags);
@@ -529,8 +529,8 @@ static int ntfs_prepare_pages_for_non_resident_write(struct page **pages,
529 "index 0x%lx, nr_pages 0x%x, pos 0x%llx, bytes 0x%zx.", 529 "index 0x%lx, nr_pages 0x%x, pos 0x%llx, bytes 0x%zx.",
530 vi->i_ino, ni->type, pages[0]->index, nr_pages, 530 vi->i_ino, ni->type, pages[0]->index, nr_pages,
531 (long long)pos, bytes); 531 (long long)pos, bytes);
532 blocksize_bits = vi->i_blkbits; 532 blocksize = vol->sb->s_blocksize;
533 blocksize = 1 << blocksize_bits; 533 blocksize_bits = vol->sb->s_blocksize_bits;
534 u = 0; 534 u = 0;
535 do { 535 do {
536 struct page *page = pages[u]; 536 struct page *page = pages[u];
@@ -1525,7 +1525,7 @@ static inline int ntfs_commit_pages_after_non_resident_write(
1525 1525
1526 vi = pages[0]->mapping->host; 1526 vi = pages[0]->mapping->host;
1527 ni = NTFS_I(vi); 1527 ni = NTFS_I(vi);
1528 blocksize = 1 << vi->i_blkbits; 1528 blocksize = vi->i_sb->s_blocksize;
1529 end = pos + bytes; 1529 end = pos + bytes;
1530 u = 0; 1530 u = 0;
1531 do { 1531 do {