Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262107
b: refs/heads/master
c: f7d0d37
h: refs/heads/master
i:
  262105: 7532f6e
  262103: ec39508
v: v3
  • Loading branch information
Allison Henderson authored and Theodore Ts'o committed Jul 18, 2011
1 parent d453648 commit 85a71d7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3eb08658431abd65c0fe6855d1860859c2d416f7
refs/heads/master: f7d0d3797fac6cad24ad9f86dd9baf65c586b434
23 changes: 21 additions & 2 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -3461,8 +3461,27 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,

ext4_ext_mark_uninitialized(ex);

err = ext4_ext_remove_space(inode, map->m_lblk,
map->m_lblk + punched_out);
ext4_ext_invalidate_cache(inode);

err = ext4_ext_rm_leaf(handle, inode, path,
map->m_lblk, map->m_lblk + punched_out);

if (!err && path->p_hdr->eh_entries == 0) {
/*
* Punch hole freed all of this sub tree,
* so we need to correct eh_depth
*/
err = ext4_ext_get_access(handle, inode, path);
if (err == 0) {
ext_inode_hdr(inode)->eh_depth = 0;
ext_inode_hdr(inode)->eh_max =
cpu_to_le16(ext4_ext_space_root(
inode, 0));

err = ext4_ext_dirty(
handle, inode, path);
}
}

goto out2;
}
Expand Down

0 comments on commit 85a71d7

Please sign in to comment.