From: Yongqiang Yang Date: Sat, 29 Oct 2011 13:39:51 +0000 (-0400) Subject: ext4: trace punch_hole correctly in ext4_ext_map_blocks X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e7b319e39776bd0e9c0c7855b023dafed2c93d27;p=linux-beck.git ext4: trace punch_hole correctly in ext4_ext_map_blocks When ext4_ext_map_blocks() is called by punch_hole, trace should trace blocks punched out. Signed-off-by: Yongqiang Yang Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 652b4dc5dfcb..36a0f177ecad 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4171,12 +4171,12 @@ out2: 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; }