aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/xattr.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/xattr.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/xattr.c')
-rw-r--r--fs/ext4/xattr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index f896e2c452f0..9b4a368c5728 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -689,7 +689,6 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
689 struct ext4_xattr_info *i, 689 struct ext4_xattr_info *i,
690 struct ext4_xattr_block_find *bs) 690 struct ext4_xattr_block_find *bs)
691{ 691{
692 unsigned long count = 1;
693 struct super_block *sb = inode->i_sb; 692 struct super_block *sb = inode->i_sb;
694 struct buffer_head *new_bh = NULL; 693 struct buffer_head *new_bh = NULL;
695 struct ext4_xattr_search *s = &bs->s; 694 struct ext4_xattr_search *s = &bs->s;
@@ -812,7 +811,7 @@ inserted:
812 ext4_fsblk_t goal = ext4_group_first_block_no(sb, 811 ext4_fsblk_t goal = ext4_group_first_block_no(sb,
813 EXT4_I(inode)->i_block_group); 812 EXT4_I(inode)->i_block_group);
814 ext4_fsblk_t block = ext4_new_meta_blocks(handle, inode, 813 ext4_fsblk_t block = ext4_new_meta_blocks(handle, inode,
815 goal, &count, &error); 814 goal, NULL, &error);
816 if (error) 815 if (error)
817 goto cleanup; 816 goto cleanup;
818 ea_idebug(inode, "creating block %d", block); 817 ea_idebug(inode, "creating block %d", block);