diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 0e87401cf335..28484b3ebc98 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -2395,7 +2395,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping, | |||
2395 | loff_t pos, loff_t *bytes) | 2395 | loff_t pos, loff_t *bytes) |
2396 | { | 2396 | { |
2397 | struct inode *inode = mapping->host; | 2397 | struct inode *inode = mapping->host; |
2398 | unsigned blocksize = 1 << inode->i_blkbits; | 2398 | unsigned int blocksize = i_blocksize(inode); |
2399 | struct page *page; | 2399 | struct page *page; |
2400 | void *fsdata; | 2400 | void *fsdata; |
2401 | pgoff_t index, curidx; | 2401 | pgoff_t index, curidx; |
@@ -2475,8 +2475,8 @@ int cont_write_begin(struct file *file, struct address_space *mapping, | |||
2475 | get_block_t *get_block, loff_t *bytes) | 2475 | get_block_t *get_block, loff_t *bytes) |
2476 | { | 2476 | { |
2477 | struct inode *inode = mapping->host; | 2477 | struct inode *inode = mapping->host; |
2478 | unsigned blocksize = 1 << inode->i_blkbits; | 2478 | unsigned int blocksize = i_blocksize(inode); |
2479 | unsigned zerofrom; | 2479 | unsigned int zerofrom; |
2480 | int err; | 2480 | int err; |
2481 | 2481 | ||
2482 | err = cont_expand_zero(file, mapping, pos, bytes); | 2482 | err = cont_expand_zero(file, mapping, pos, bytes); |
@@ -2838,7 +2838,7 @@ int nobh_truncate_page(struct address_space *mapping, | |||
2838 | struct buffer_head map_bh; | 2838 | struct buffer_head map_bh; |
2839 | int err; | 2839 | int err; |
2840 | 2840 | ||
2841 | blocksize = 1 << inode->i_blkbits; | 2841 | blocksize = i_blocksize(inode); |
2842 | length = offset & (blocksize - 1); | 2842 | length = offset & (blocksize - 1); |
2843 | 2843 | ||
2844 | /* Block boundary? Nothing to do */ | 2844 | /* Block boundary? Nothing to do */ |
@@ -2916,7 +2916,7 @@ int block_truncate_page(struct address_space *mapping, | |||
2916 | struct buffer_head *bh; | 2916 | struct buffer_head *bh; |
2917 | int err; | 2917 | int err; |
2918 | 2918 | ||
2919 | blocksize = 1 << inode->i_blkbits; | 2919 | blocksize = i_blocksize(inode); |
2920 | length = offset & (blocksize - 1); | 2920 | length = offset & (blocksize - 1); |
2921 | 2921 | ||
2922 | /* Block boundary? Nothing to do */ | 2922 | /* Block boundary? Nothing to do */ |
@@ -3028,7 +3028,7 @@ sector_t generic_block_bmap(struct address_space *mapping, sector_t block, | |||
3028 | struct inode *inode = mapping->host; | 3028 | struct inode *inode = mapping->host; |
3029 | tmp.b_state = 0; | 3029 | tmp.b_state = 0; |
3030 | tmp.b_blocknr = 0; | 3030 | tmp.b_blocknr = 0; |
3031 | tmp.b_size = 1 << inode->i_blkbits; | 3031 | tmp.b_size = i_blocksize(inode); |
3032 | get_block(inode, block, &tmp, 0); | 3032 | get_block(inode, block, &tmp, 0); |
3033 | return tmp.b_blocknr; | 3033 | return tmp.b_blocknr; |
3034 | } | 3034 | } |