diff options
| -rw-r--r-- | fs/ext4/extents.c | 12 | ||||
| -rw-r--r-- | fs/ext4/inode.c | 7 | ||||
| -rw-r--r-- | fs/ext4/page-io.c | 4 |
3 files changed, 2 insertions, 21 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 240b6dea5441..82e239a176c7 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
| @@ -4048,18 +4048,8 @@ out: | |||
| 4048 | } else | 4048 | } else |
| 4049 | allocated = ret; | 4049 | allocated = ret; |
| 4050 | map->m_flags |= EXT4_MAP_NEW; | 4050 | map->m_flags |= EXT4_MAP_NEW; |
| 4051 | /* | 4051 | if (allocated > map->m_len) |
| 4052 | * if we allocated more blocks than requested | ||
| 4053 | * we need to make sure we unmap the extra block | ||
| 4054 | * allocated. The actual needed block will get | ||
| 4055 | * unmapped later when we find the buffer_head marked | ||
| 4056 | * new. | ||
| 4057 | */ | ||
| 4058 | if (allocated > map->m_len) { | ||
| 4059 | clean_bdev_aliases(inode->i_sb->s_bdev, newblock + map->m_len, | ||
| 4060 | allocated - map->m_len); | ||
| 4061 | allocated = map->m_len; | 4052 | allocated = map->m_len; |
| 4062 | } | ||
| 4063 | map->m_len = allocated; | 4053 | map->m_len = allocated; |
| 4064 | 4054 | ||
| 4065 | map_out: | 4055 | map_out: |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 213d1857a7cf..dd4641f3cdb9 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
| @@ -678,8 +678,6 @@ found: | |||
| 678 | if (flags & EXT4_GET_BLOCKS_ZERO && | 678 | if (flags & EXT4_GET_BLOCKS_ZERO && |
| 679 | map->m_flags & EXT4_MAP_MAPPED && | 679 | map->m_flags & EXT4_MAP_MAPPED && |
| 680 | map->m_flags & EXT4_MAP_NEW) { | 680 | map->m_flags & EXT4_MAP_NEW) { |
| 681 | clean_bdev_aliases(inode->i_sb->s_bdev, map->m_pblk, | ||
| 682 | map->m_len); | ||
| 683 | ret = ext4_issue_zeroout(inode, map->m_lblk, | 681 | ret = ext4_issue_zeroout(inode, map->m_lblk, |
| 684 | map->m_pblk, map->m_len); | 682 | map->m_pblk, map->m_len); |
| 685 | if (ret) { | 683 | if (ret) { |
| @@ -1194,7 +1192,6 @@ static int ext4_block_write_begin(struct page *page, loff_t pos, unsigned len, | |||
| 1194 | if (err) | 1192 | if (err) |
| 1195 | break; | 1193 | break; |
| 1196 | if (buffer_new(bh)) { | 1194 | if (buffer_new(bh)) { |
| 1197 | clean_bdev_bh_alias(bh); | ||
| 1198 | if (PageUptodate(page)) { | 1195 | if (PageUptodate(page)) { |
| 1199 | clear_buffer_new(bh); | 1196 | clear_buffer_new(bh); |
| 1200 | set_buffer_uptodate(bh); | 1197 | set_buffer_uptodate(bh); |
| @@ -2490,10 +2487,6 @@ static int mpage_map_one_extent(handle_t *handle, struct mpage_da_data *mpd) | |||
| 2490 | } | 2487 | } |
| 2491 | 2488 | ||
| 2492 | BUG_ON(map->m_len == 0); | 2489 | BUG_ON(map->m_len == 0); |
| 2493 | if (map->m_flags & EXT4_MAP_NEW) { | ||
| 2494 | clean_bdev_aliases(inode->i_sb->s_bdev, map->m_pblk, | ||
| 2495 | map->m_len); | ||
| 2496 | } | ||
| 2497 | return 0; | 2490 | return 0; |
| 2498 | } | 2491 | } |
| 2499 | 2492 | ||
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index 2aa62d58d8dd..15599466809b 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c | |||
| @@ -467,10 +467,8 @@ int ext4_bio_write_page(struct ext4_io_submit *io, | |||
| 467 | ext4_io_submit(io); | 467 | ext4_io_submit(io); |
| 468 | continue; | 468 | continue; |
| 469 | } | 469 | } |
| 470 | if (buffer_new(bh)) { | 470 | if (buffer_new(bh)) |
| 471 | clear_buffer_new(bh); | 471 | clear_buffer_new(bh); |
| 472 | clean_bdev_bh_alias(bh); | ||
| 473 | } | ||
| 474 | set_buffer_async_write(bh); | 472 | set_buffer_async_write(bh); |
| 475 | nr_to_submit++; | 473 | nr_to_submit++; |
| 476 | } while ((bh = bh->b_this_page) != head); | 474 | } while ((bh = bh->b_this_page) != head); |
