mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[PATCH] pass b_size to ->get_block()
Pass amount of disk needs to be mapped to get_block(). This way one can modify the fs ->get_block() functions to map multiple blocks at the same time. [[email protected]: performance tweak] [[email protected]: remove unneeded assignments] Signed-off-by: Badari Pulavarty <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
205f87f6b3
commit
b0cf2321c6
3 changed files with 11 additions and 1 deletions
|
|
@ -192,6 +192,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
|
|||
page_block++, block_in_file++) {
|
||||
bh.b_state = 0;
|
||||
if (block_in_file < last_block) {
|
||||
bh.b_size = blocksize;
|
||||
if (get_block(inode, block_in_file, &bh, 0))
|
||||
goto confused;
|
||||
}
|
||||
|
|
@ -472,6 +473,7 @@ __mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block,
|
|||
for (page_block = 0; page_block < blocks_per_page; ) {
|
||||
|
||||
map_bh.b_state = 0;
|
||||
map_bh.b_size = 1 << blkbits;
|
||||
if (get_block(inode, block_in_file, &map_bh, 1))
|
||||
goto confused;
|
||||
if (buffer_new(&map_bh))
|
||||
|
|
|
|||
Loading…
Reference in a new issue