aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorZheng Liu <wenqing.lz@taobao.com>2012-11-08 14:47:52 -0500
committerTheodore Ts'o <tytso@mit.edu>2012-11-08 14:47:52 -0500
commit37794732467dd998a34bfce19738ad3ef1f37507 (patch)
tree98e785b4d2628eb3657138201c5033158b48c89c /fs
parent19b303d8b5a0e8150a4697c01ca03e75a0a17469 (diff)
ext4: fix missing call to trace_ext4_ext_map_blocks_exit
When ext4_ext_handle_uninitialized_extents(), we will directly return from ext4_ext_map_blocks(). The trace point of trace_ext4_ext_map_blocks_exit isn't called, and the user doesn't see any result. This patch tries to fix this problem. Meanwhile in ext4_ext_handle_uninitialized_extents it returns errors or the number of allocated blocks. So 'ret' variable can be removed due to previously modifications. Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/extents.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 7a64c193b2af..dce97de6a409 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3911,7 +3911,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
3911 struct ext4_extent newex, *ex, *ex2; 3911 struct ext4_extent newex, *ex, *ex2;
3912 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); 3912 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
3913 ext4_fsblk_t newblock = 0; 3913 ext4_fsblk_t newblock = 0;
3914 int free_on_err = 0, err = 0, depth, ret; 3914 int free_on_err = 0, err = 0, depth;
3915 unsigned int allocated = 0, offset = 0; 3915 unsigned int allocated = 0, offset = 0;
3916 unsigned int allocated_clusters = 0; 3916 unsigned int allocated_clusters = 0;
3917 struct ext4_allocation_request ar; 3917 struct ext4_allocation_request ar;
@@ -4007,10 +4007,10 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
4007 ee_len, ee_start); 4007 ee_len, ee_start);
4008 goto out; 4008 goto out;
4009 } 4009 }
4010 ret = ext4_ext_handle_uninitialized_extents( 4010 allocated = ext4_ext_handle_uninitialized_extents(
4011 handle, inode, map, path, flags, 4011 handle, inode, map, path, flags,
4012 allocated, newblock); 4012 allocated, newblock);
4013 return ret; 4013 goto out3;
4014 } 4014 }
4015 } 4015 }
4016 4016
@@ -4284,6 +4284,7 @@ out2:
4284 kfree(path); 4284 kfree(path);
4285 } 4285 }
4286 4286
4287out3:
4287 trace_ext4_ext_map_blocks_exit(inode, map, err ? err : allocated); 4288 trace_ext4_ext_map_blocks_exit(inode, map, err ? err : allocated);
4288 4289
4289 return err ? err : allocated; 4290 return err ? err : allocated;