diff options
Diffstat (limited to 'fs/ext4/readpage.c')
-rw-r--r-- | fs/ext4/readpage.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index 5dc5e95063de..ea27aa1a778c 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c | |||
@@ -140,7 +140,7 @@ int ext4_mpage_readpages(struct address_space *mapping, | |||
140 | 140 | ||
141 | struct inode *inode = mapping->host; | 141 | struct inode *inode = mapping->host; |
142 | const unsigned blkbits = inode->i_blkbits; | 142 | const unsigned blkbits = inode->i_blkbits; |
143 | const unsigned blocks_per_page = PAGE_CACHE_SIZE >> blkbits; | 143 | const unsigned blocks_per_page = PAGE_SIZE >> blkbits; |
144 | const unsigned blocksize = 1 << blkbits; | 144 | const unsigned blocksize = 1 << blkbits; |
145 | sector_t block_in_file; | 145 | sector_t block_in_file; |
146 | sector_t last_block; | 146 | sector_t last_block; |
@@ -173,7 +173,7 @@ int ext4_mpage_readpages(struct address_space *mapping, | |||
173 | if (page_has_buffers(page)) | 173 | if (page_has_buffers(page)) |
174 | goto confused; | 174 | goto confused; |
175 | 175 | ||
176 | block_in_file = (sector_t)page->index << (PAGE_CACHE_SHIFT - blkbits); | 176 | block_in_file = (sector_t)page->index << (PAGE_SHIFT - blkbits); |
177 | last_block = block_in_file + nr_pages * blocks_per_page; | 177 | last_block = block_in_file + nr_pages * blocks_per_page; |
178 | last_block_in_file = (i_size_read(inode) + blocksize - 1) >> blkbits; | 178 | last_block_in_file = (i_size_read(inode) + blocksize - 1) >> blkbits; |
179 | if (last_block > last_block_in_file) | 179 | if (last_block > last_block_in_file) |
@@ -217,7 +217,7 @@ int ext4_mpage_readpages(struct address_space *mapping, | |||
217 | set_error_page: | 217 | set_error_page: |
218 | SetPageError(page); | 218 | SetPageError(page); |
219 | zero_user_segment(page, 0, | 219 | zero_user_segment(page, 0, |
220 | PAGE_CACHE_SIZE); | 220 | PAGE_SIZE); |
221 | unlock_page(page); | 221 | unlock_page(page); |
222 | goto next_page; | 222 | goto next_page; |
223 | } | 223 | } |
@@ -250,7 +250,7 @@ int ext4_mpage_readpages(struct address_space *mapping, | |||
250 | } | 250 | } |
251 | if (first_hole != blocks_per_page) { | 251 | if (first_hole != blocks_per_page) { |
252 | zero_user_segment(page, first_hole << blkbits, | 252 | zero_user_segment(page, first_hole << blkbits, |
253 | PAGE_CACHE_SIZE); | 253 | PAGE_SIZE); |
254 | if (first_hole == 0) { | 254 | if (first_hole == 0) { |
255 | SetPageUptodate(page); | 255 | SetPageUptodate(page); |
256 | unlock_page(page); | 256 | unlock_page(page); |
@@ -319,7 +319,7 @@ int ext4_mpage_readpages(struct address_space *mapping, | |||
319 | unlock_page(page); | 319 | unlock_page(page); |
320 | next_page: | 320 | next_page: |
321 | if (pages) | 321 | if (pages) |
322 | page_cache_release(page); | 322 | put_page(page); |
323 | } | 323 | } |
324 | BUG_ON(pages && !list_empty(pages)); | 324 | BUG_ON(pages && !list_empty(pages)); |
325 | if (bio) | 325 | if (bio) |