aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/balloc.c17
-rw-r--r--fs/ext4/ext4.h2
-rw-r--r--fs/ext4/extents.c3
-rw-r--r--fs/ext4/xattr.c5
4 files changed, 5 insertions, 22 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 10ce275ebbf1..98a97129fc5f 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -724,23 +724,6 @@ ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode,
724 return ret; 724 return ret;
725} 725}
726 726
727/*
728 * ext4_new_meta_block() -- allocate block for meta data (indexing) blocks
729 *
730 * @handle: handle to this transaction
731 * @inode: file inode
732 * @goal: given target block(filesystem wide)
733 * @errp: error code
734 *
735 * Return allocated block number on success
736 */
737ext4_fsblk_t ext4_new_meta_block(handle_t *handle, struct inode *inode,
738 ext4_fsblk_t goal, int *errp)
739{
740 unsigned long count = 1;
741 return ext4_new_meta_blocks(handle, inode, goal, &count, errp);
742}
743
744/** 727/**
745 * ext4_count_free_blocks() -- count filesystem free blocks 728 * ext4_count_free_blocks() -- count filesystem free blocks
746 * @sb: superblock 729 * @sb: superblock
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 74cb395e689f..ac8551e0b70a 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -998,8 +998,6 @@ extern ext4_grpblk_t ext4_block_group_offset(struct super_block *sb,
998extern int ext4_bg_has_super(struct super_block *sb, ext4_group_t group); 998extern int ext4_bg_has_super(struct super_block *sb, ext4_group_t group);
999extern unsigned long ext4_bg_num_gdb(struct super_block *sb, 999extern unsigned long ext4_bg_num_gdb(struct super_block *sb,
1000 ext4_group_t group); 1000 ext4_group_t group);
1001extern ext4_fsblk_t ext4_new_meta_block(handle_t *handle, struct inode *inode,
1002 ext4_fsblk_t goal, int *errp);
1003extern ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode, 1001extern ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode,
1004 ext4_fsblk_t goal, unsigned long *count, int *errp); 1002 ext4_fsblk_t goal, unsigned long *count, int *errp);
1005extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, s64 nblocks); 1003extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, s64 nblocks);
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ea2ce3c0ae66..e5b169b44b4c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -189,9 +189,10 @@ 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;
192 193
193 goal = ext4_ext_find_goal(inode, path, le32_to_cpu(ex->ee_block)); 194 goal = ext4_ext_find_goal(inode, path, le32_to_cpu(ex->ee_block));
194 newblock = ext4_new_meta_block(handle, inode, goal, err); 195 newblock = ext4_new_meta_blocks(handle, inode, goal, &count, err);
195 return newblock; 196 return newblock;
196} 197}
197 198
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 80626d516fee..f896e2c452f0 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -689,6 +689,7 @@ 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;
692 struct super_block *sb = inode->i_sb; 693 struct super_block *sb = inode->i_sb;
693 struct buffer_head *new_bh = NULL; 694 struct buffer_head *new_bh = NULL;
694 struct ext4_xattr_search *s = &bs->s; 695 struct ext4_xattr_search *s = &bs->s;
@@ -810,8 +811,8 @@ inserted:
810 /* We need to allocate a new block */ 811 /* We need to allocate a new block */
811 ext4_fsblk_t goal = ext4_group_first_block_no(sb, 812 ext4_fsblk_t goal = ext4_group_first_block_no(sb,
812 EXT4_I(inode)->i_block_group); 813 EXT4_I(inode)->i_block_group);
813 ext4_fsblk_t block = ext4_new_meta_block(handle, inode, 814 ext4_fsblk_t block = ext4_new_meta_blocks(handle, inode,
814 goal, &error); 815 goal, &count, &error);
815 if (error) 816 if (error)
816 goto cleanup; 817 goto cleanup;
817 ea_idebug(inode, "creating block %d", block); 818 ea_idebug(inode, "creating block %d", block);