diff options
author | zhangyi (F) <yi.zhang@huawei.com> | 2019-02-10 23:32:07 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-02-10 23:32:07 -0500 |
commit | 16e08b14a4550bb167c48e918b26ef0d4980e9d1 (patch) | |
tree | 5993d16cf13cdd5f6a6cf8402a79c26375cafd35 /fs/ext4/extents.c | |
parent | 597599268e3b91cac71faf48743f4783dec682fc (diff) | |
download | linux-16e08b14a4550bb167c48e918b26ef0d4980e9d1.tar.bz2 |
ext4: cleanup clean_bdev_aliases() calls
Now, we have already handle all cases of forgetting buffer in
jbd2_journal_forget(), the buffer should not be mapped to blockdevice
when reallocating it. So this patch remove all clean_bdev_aliases() and
clean_bdev_bh_alias() calls which were invoked by ext4 explicitly.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 12 |
1 files changed, 1 insertions, 11 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: } else allocated = ret; map->m_flags |= EXT4_MAP_NEW; - /* - * if we allocated more blocks than requested - * we need to make sure we unmap the extra block - * allocated. The actual needed block will get - * unmapped later when we find the buffer_head marked - * new. - */ - if (allocated > map->m_len) { - clean_bdev_aliases(inode->i_sb->s_bdev, newblock + map->m_len, - allocated - map->m_len); + if (allocated > map->m_len) allocated = map->m_len; - } map->m_len = allocated; map_out: |