aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/aops.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-02-24 17:36:42 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-24 17:36:42 -0500
commit2cb5b6beef3a3357ef1f2a580d5e2284516efc39 (patch)
tree8f9e12f91652c510632cb9965f2c4b92d2b19717 /fs/ntfs/aops.c
parent329dda083e496bc5ffbb4b1973243bd8a9420e24 (diff)
parent1cf3109ffb26a6ea572fd02436bd10458b4b2187 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs-2.6
Diffstat (limited to 'fs/ntfs/aops.c')
-rw-r--r--fs/ntfs/aops.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index 1c0a4315876a..7e361da770b3 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -2,7 +2,7 @@
2 * aops.c - NTFS kernel address space operations and page cache handling. 2 * aops.c - NTFS kernel address space operations and page cache handling.
3 * Part of the Linux-NTFS project. 3 * Part of the Linux-NTFS project.
4 * 4 *
5 * Copyright (c) 2001-2005 Anton Altaparmakov 5 * Copyright (c) 2001-2006 Anton Altaparmakov
6 * Copyright (c) 2002 Richard Russon 6 * Copyright (c) 2002 Richard Russon
7 * 7 *
8 * This program/include file is free software; you can redistribute it and/or 8 * This program/include file is free software; you can redistribute it and/or
@@ -200,8 +200,8 @@ static int ntfs_read_block(struct page *page)
200 /* $MFT/$DATA must have its complete runlist in memory at all times. */ 200 /* $MFT/$DATA must have its complete runlist in memory at all times. */
201 BUG_ON(!ni->runlist.rl && !ni->mft_no && !NInoAttr(ni)); 201 BUG_ON(!ni->runlist.rl && !ni->mft_no && !NInoAttr(ni));
202 202
203 blocksize_bits = VFS_I(ni)->i_blkbits; 203 blocksize = vol->sb->s_blocksize;
204 blocksize = 1 << blocksize_bits; 204 blocksize_bits = vol->sb->s_blocksize_bits;
205 205
206 if (!page_has_buffers(page)) { 206 if (!page_has_buffers(page)) {
207 create_empty_buffers(page, blocksize, 0); 207 create_empty_buffers(page, blocksize, 0);
@@ -569,10 +569,8 @@ static int ntfs_write_block(struct page *page, struct writeback_control *wbc)
569 569
570 BUG_ON(!NInoNonResident(ni)); 570 BUG_ON(!NInoNonResident(ni));
571 BUG_ON(NInoMstProtected(ni)); 571 BUG_ON(NInoMstProtected(ni));
572 572 blocksize = vol->sb->s_blocksize;
573 blocksize_bits = vi->i_blkbits; 573 blocksize_bits = vol->sb->s_blocksize_bits;
574 blocksize = 1 << blocksize_bits;
575
576 if (!page_has_buffers(page)) { 574 if (!page_has_buffers(page)) {
577 BUG_ON(!PageUptodate(page)); 575 BUG_ON(!PageUptodate(page));
578 create_empty_buffers(page, blocksize, 576 create_empty_buffers(page, blocksize,
@@ -949,8 +947,8 @@ static int ntfs_write_mst_block(struct page *page,
949 */ 947 */
950 BUG_ON(!(is_mft || S_ISDIR(vi->i_mode) || 948 BUG_ON(!(is_mft || S_ISDIR(vi->i_mode) ||
951 (NInoAttr(ni) && ni->type == AT_INDEX_ALLOCATION))); 949 (NInoAttr(ni) && ni->type == AT_INDEX_ALLOCATION)));
952 bh_size_bits = vi->i_blkbits; 950 bh_size = vol->sb->s_blocksize;
953 bh_size = 1 << bh_size_bits; 951 bh_size_bits = vol->sb->s_blocksize_bits;
954 max_bhs = PAGE_CACHE_SIZE / bh_size; 952 max_bhs = PAGE_CACHE_SIZE / bh_size;
955 BUG_ON(!max_bhs); 953 BUG_ON(!max_bhs);
956 BUG_ON(max_bhs > MAX_BUF_PER_PAGE); 954 BUG_ON(max_bhs > MAX_BUF_PER_PAGE);
@@ -1596,7 +1594,7 @@ void mark_ntfs_record_dirty(struct page *page, const unsigned int ofs) {
1596 1594
1597 BUG_ON(!PageUptodate(page)); 1595 BUG_ON(!PageUptodate(page));
1598 end = ofs + ni->itype.index.block_size; 1596 end = ofs + ni->itype.index.block_size;
1599 bh_size = 1 << VFS_I(ni)->i_blkbits; 1597 bh_size = VFS_I(ni)->i_sb->s_blocksize;
1600 spin_lock(&mapping->private_lock); 1598 spin_lock(&mapping->private_lock);
1601 if (unlikely(!page_has_buffers(page))) { 1599 if (unlikely(!page_has_buffers(page))) {
1602 spin_unlock(&mapping->private_lock); 1600 spin_unlock(&mapping->private_lock);