diff options
author | Jan Kara <jack@suse.cz> | 2016-11-04 18:08:13 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-04 14:34:47 -0600 |
commit | 64e1c57fa4740ac0728afe173e5a025b0e94cd55 (patch) | |
tree | 032bb2137953ad971f36ddd9e848a1f2ab16f54d /fs/ext4/inode.c | |
parent | f734c89cc96e9b6f903865cd2656d9d8a7e160e7 (diff) | |
download | op-kernel-dev-64e1c57fa4740ac0728afe173e5a025b0e94cd55.zip op-kernel-dev-64e1c57fa4740ac0728afe173e5a025b0e94cd55.tar.gz |
ext4: Use clean_bdev_aliases() instead of iteration
Use clean_bdev_aliases() instead of iterating through blocks one by one.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 9c06472..7c7cc4a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -654,12 +654,8 @@ found: if (flags & EXT4_GET_BLOCKS_ZERO && map->m_flags & EXT4_MAP_MAPPED && map->m_flags & EXT4_MAP_NEW) { - ext4_lblk_t i; - - for (i = 0; i < map->m_len; i++) { - unmap_underlying_metadata(inode->i_sb->s_bdev, - map->m_pblk + i); - } + clean_bdev_aliases(inode->i_sb->s_bdev, map->m_pblk, + map->m_len); ret = ext4_issue_zeroout(inode, map->m_lblk, map->m_pblk, map->m_len); if (ret) { @@ -2360,11 +2356,8 @@ static int mpage_map_one_extent(handle_t *handle, struct mpage_da_data *mpd) BUG_ON(map->m_len == 0); if (map->m_flags & EXT4_MAP_NEW) { - struct block_device *bdev = inode->i_sb->s_bdev; - int i; - - for (i = 0; i < map->m_len; i++) - unmap_underlying_metadata(bdev, map->m_pblk + i); + clean_bdev_aliases(inode->i_sb->s_bdev, map->m_pblk, + map->m_len); } return 0; } |