aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-12-12 12:41:28 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-12-12 12:41:28 -0500
commit97df5d155dee478efe33b001f502e9630e1bba92 (patch)
tree11847bd119be9b68365a2fa4beb5f95f691162b1 /fs/ext4/extents.c
parentcfe82c856747b7841a3a00d591ce9ed46f579d27 (diff)
ext4: remove do_blk_alloc()
The convenience function do_blk_alloc() is a static function with only one caller, so fold it into ext4_new_meta_blocks() to simplify the code and to make it easier to understand. To save more stack space, if count is a null pointer in ext4_new_meta_blocks() assume that caller wanted a single block (and if there is an error, no blocks were allocated). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index e5b169b44b4c..59401d057c69 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -189,10 +189,9 @@ ext4_ext_new_meta_block(handle_t *handle, struct inode *inode,
189 struct ext4_extent *ex, int *err) 189 struct ext4_extent *ex, int *err)
190{ 190{
191 ext4_fsblk_t goal, newblock; 191 ext4_fsblk_t goal, newblock;
192 unsigned long count = 1;
193 192
194 goal = ext4_ext_find_goal(inode, path, le32_to_cpu(ex->ee_block)); 193 goal = ext4_ext_find_goal(inode, path, le32_to_cpu(ex->ee_block));
195 newblock = ext4_new_meta_blocks(handle, inode, goal, &count, err); 194 newblock = ext4_new_meta_blocks(handle, inode, goal, NULL, err);
196 return newblock; 195 return newblock;
197} 196}
198 197