Skip to content

Commit

Permalink
ext4: trace punch_hole correctly in ext4_ext_map_blocks
Browse files Browse the repository at this point in the history
When ext4_ext_map_blocks() is called by punch_hole, trace should
trace blocks punched out.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Yongqiang Yang authored and Theodore Ts'o committed Oct 29, 2011
1 parent 02dc62f commit e7b319e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -4171,12 +4171,12 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
ext4_ext_drop_refs(path);
kfree(path);
}
trace_ext4_ext_map_blocks_exit(inode, map->m_lblk,
newblock, map->m_len, err ? err : allocated);

result = (flags & EXT4_GET_BLOCKS_PUNCH_OUT_EXT) ?
punched_out : allocated;

trace_ext4_ext_map_blocks_exit(inode, map->m_lblk,
newblock, map->m_len, err ? err : result);

return err ? err : result;
}

Expand Down

0 comments on commit e7b319e

Please sign in to comment.