diff options
author | Joel Becker <joel.becker@oracle.com> | 2010-03-25 22:08:07 -0400 |
---|---|---|
committer | Tao Ma <tao.ma@oracle.com> | 2010-03-25 22:08:07 -0400 |
commit | aa8f8e93c898a0319bcd6c79a9a42fe52abac7d7 (patch) | |
tree | 0fa5cbd4dccf25399b3da68f7627e235a9b717e5 /fs/ocfs2/suballoc.c | |
parent | 9cbc01231e82f9390edaea2b766abcb7165dc4b2 (diff) |
ocfs2: ocfs2_claim_suballoc_bits() doesn't need an osb argument.
It's contained on ac->ac_inode->i_sb anyway.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r-- | fs/ocfs2/suballoc.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 3d823cffc620..602c05eae7c5 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -86,8 +86,7 @@ static int ocfs2_block_group_search(struct inode *inode, | |||
86 | u32 bits_wanted, u32 min_bits, | 86 | u32 bits_wanted, u32 min_bits, |
87 | u64 max_block, | 87 | u64 max_block, |
88 | struct ocfs2_suballoc_result *res); | 88 | struct ocfs2_suballoc_result *res); |
89 | static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, | 89 | static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac, |
90 | struct ocfs2_alloc_context *ac, | ||
91 | handle_t *handle, | 90 | handle_t *handle, |
92 | u32 bits_wanted, | 91 | u32 bits_wanted, |
93 | u32 min_bits, | 92 | u32 min_bits, |
@@ -1764,8 +1763,7 @@ bail: | |||
1764 | } | 1763 | } |
1765 | 1764 | ||
1766 | /* will give out up to bits_wanted contiguous bits. */ | 1765 | /* will give out up to bits_wanted contiguous bits. */ |
1767 | static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, | 1766 | static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac, |
1768 | struct ocfs2_alloc_context *ac, | ||
1769 | handle_t *handle, | 1767 | handle_t *handle, |
1770 | u32 bits_wanted, | 1768 | u32 bits_wanted, |
1771 | u32 min_bits, | 1769 | u32 min_bits, |
@@ -1791,7 +1789,8 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, | |||
1791 | 1789 | ||
1792 | if (le32_to_cpu(fe->id1.bitmap1.i_used) >= | 1790 | if (le32_to_cpu(fe->id1.bitmap1.i_used) >= |
1793 | le32_to_cpu(fe->id1.bitmap1.i_total)) { | 1791 | le32_to_cpu(fe->id1.bitmap1.i_total)) { |
1794 | ocfs2_error(osb->sb, "Chain allocator dinode %llu has %u used " | 1792 | ocfs2_error(ac->ac_inode->i_sb, |
1793 | "Chain allocator dinode %llu has %u used " | ||
1795 | "bits but only %u total.", | 1794 | "bits but only %u total.", |
1796 | (unsigned long long)le64_to_cpu(fe->i_blkno), | 1795 | (unsigned long long)le64_to_cpu(fe->i_blkno), |
1797 | le32_to_cpu(fe->id1.bitmap1.i_used), | 1796 | le32_to_cpu(fe->id1.bitmap1.i_used), |
@@ -1887,8 +1886,7 @@ int ocfs2_claim_metadata(struct ocfs2_super *osb, | |||
1887 | BUG_ON(ac->ac_bits_wanted < (ac->ac_bits_given + bits_wanted)); | 1886 | BUG_ON(ac->ac_bits_wanted < (ac->ac_bits_given + bits_wanted)); |
1888 | BUG_ON(ac->ac_which != OCFS2_AC_USE_META); | 1887 | BUG_ON(ac->ac_which != OCFS2_AC_USE_META); |
1889 | 1888 | ||
1890 | status = ocfs2_claim_suballoc_bits(osb, | 1889 | status = ocfs2_claim_suballoc_bits(ac, |
1891 | ac, | ||
1892 | handle, | 1890 | handle, |
1893 | bits_wanted, | 1891 | bits_wanted, |
1894 | 1, | 1892 | 1, |
@@ -1960,8 +1958,7 @@ int ocfs2_claim_new_inode(struct ocfs2_super *osb, | |||
1960 | 1958 | ||
1961 | ocfs2_init_inode_ac_group(dir, parent_fe_bh, ac); | 1959 | ocfs2_init_inode_ac_group(dir, parent_fe_bh, ac); |
1962 | 1960 | ||
1963 | status = ocfs2_claim_suballoc_bits(osb, | 1961 | status = ocfs2_claim_suballoc_bits(ac, |
1964 | ac, | ||
1965 | handle, | 1962 | handle, |
1966 | 1, | 1963 | 1, |
1967 | 1, | 1964 | 1, |
@@ -2089,8 +2086,7 @@ int __ocfs2_claim_clusters(struct ocfs2_super *osb, | |||
2089 | if (bits_wanted > (osb->bitmap_cpg - 1)) | 2086 | if (bits_wanted > (osb->bitmap_cpg - 1)) |
2090 | bits_wanted = osb->bitmap_cpg - 1; | 2087 | bits_wanted = osb->bitmap_cpg - 1; |
2091 | 2088 | ||
2092 | status = ocfs2_claim_suballoc_bits(osb, | 2089 | status = ocfs2_claim_suballoc_bits(ac, |
2093 | ac, | ||
2094 | handle, | 2090 | handle, |
2095 | bits_wanted, | 2091 | bits_wanted, |
2096 | min_clusters, | 2092 | min_clusters, |