Commit aa8f8e93 authored by Joel Becker's avatar Joel Becker Committed by Tao Ma

ocfs2: ocfs2_claim_suballoc_bits() doesn't need an osb argument.

It's contained on ac->ac_inode->i_sb anyway.
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
parent 9cbc0123
...@@ -86,8 +86,7 @@ static int ocfs2_block_group_search(struct inode *inode, ...@@ -86,8 +86,7 @@ static int ocfs2_block_group_search(struct inode *inode,
u32 bits_wanted, u32 min_bits, u32 bits_wanted, u32 min_bits,
u64 max_block, u64 max_block,
struct ocfs2_suballoc_result *res); struct ocfs2_suballoc_result *res);
static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac,
struct ocfs2_alloc_context *ac,
handle_t *handle, handle_t *handle,
u32 bits_wanted, u32 bits_wanted,
u32 min_bits, u32 min_bits,
...@@ -1764,8 +1763,7 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, ...@@ -1764,8 +1763,7 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,
} }
/* will give out up to bits_wanted contiguous bits. */ /* will give out up to bits_wanted contiguous bits. */
static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac,
struct ocfs2_alloc_context *ac,
handle_t *handle, handle_t *handle,
u32 bits_wanted, u32 bits_wanted,
u32 min_bits, u32 min_bits,
...@@ -1791,7 +1789,8 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, ...@@ -1791,7 +1789,8 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb,
if (le32_to_cpu(fe->id1.bitmap1.i_used) >= if (le32_to_cpu(fe->id1.bitmap1.i_used) >=
le32_to_cpu(fe->id1.bitmap1.i_total)) { le32_to_cpu(fe->id1.bitmap1.i_total)) {
ocfs2_error(osb->sb, "Chain allocator dinode %llu has %u used " ocfs2_error(ac->ac_inode->i_sb,
"Chain allocator dinode %llu has %u used "
"bits but only %u total.", "bits but only %u total.",
(unsigned long long)le64_to_cpu(fe->i_blkno), (unsigned long long)le64_to_cpu(fe->i_blkno),
le32_to_cpu(fe->id1.bitmap1.i_used), le32_to_cpu(fe->id1.bitmap1.i_used),
...@@ -1887,8 +1886,7 @@ int ocfs2_claim_metadata(struct ocfs2_super *osb, ...@@ -1887,8 +1886,7 @@ int ocfs2_claim_metadata(struct ocfs2_super *osb,
BUG_ON(ac->ac_bits_wanted < (ac->ac_bits_given + bits_wanted)); BUG_ON(ac->ac_bits_wanted < (ac->ac_bits_given + bits_wanted));
BUG_ON(ac->ac_which != OCFS2_AC_USE_META); BUG_ON(ac->ac_which != OCFS2_AC_USE_META);
status = ocfs2_claim_suballoc_bits(osb, status = ocfs2_claim_suballoc_bits(ac,
ac,
handle, handle,
bits_wanted, bits_wanted,
1, 1,
...@@ -1960,8 +1958,7 @@ int ocfs2_claim_new_inode(struct ocfs2_super *osb, ...@@ -1960,8 +1958,7 @@ int ocfs2_claim_new_inode(struct ocfs2_super *osb,
ocfs2_init_inode_ac_group(dir, parent_fe_bh, ac); ocfs2_init_inode_ac_group(dir, parent_fe_bh, ac);
status = ocfs2_claim_suballoc_bits(osb, status = ocfs2_claim_suballoc_bits(ac,
ac,
handle, handle,
1, 1,
1, 1,
...@@ -2089,8 +2086,7 @@ int __ocfs2_claim_clusters(struct ocfs2_super *osb, ...@@ -2089,8 +2086,7 @@ int __ocfs2_claim_clusters(struct ocfs2_super *osb,
if (bits_wanted > (osb->bitmap_cpg - 1)) if (bits_wanted > (osb->bitmap_cpg - 1))
bits_wanted = osb->bitmap_cpg - 1; bits_wanted = osb->bitmap_cpg - 1;
status = ocfs2_claim_suballoc_bits(osb, status = ocfs2_claim_suballoc_bits(ac,
ac,
handle, handle,
bits_wanted, bits_wanted,
min_clusters, min_clusters,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment