diff options
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r-- | fs/ocfs2/suballoc.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 08d8844a3c2d..f0056b7d4353 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -1172,8 +1172,8 @@ static int ocfs2_search_one_group(struct ocfs2_alloc_context *ac, | |||
1172 | struct ocfs2_group_desc *gd; | 1172 | struct ocfs2_group_desc *gd; |
1173 | struct inode *alloc_inode = ac->ac_inode; | 1173 | struct inode *alloc_inode = ac->ac_inode; |
1174 | 1174 | ||
1175 | ret = ocfs2_read_block(OCFS2_SB(alloc_inode->i_sb), gd_blkno, | 1175 | ret = ocfs2_read_block(alloc_inode, gd_blkno, |
1176 | &group_bh, OCFS2_BH_CACHED, alloc_inode); | 1176 | &group_bh, OCFS2_BH_CACHED); |
1177 | if (ret < 0) { | 1177 | if (ret < 0) { |
1178 | mlog_errno(ret); | 1178 | mlog_errno(ret); |
1179 | return ret; | 1179 | return ret; |
@@ -1242,9 +1242,9 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, | |||
1242 | bits_wanted, chain, | 1242 | bits_wanted, chain, |
1243 | (unsigned long long)OCFS2_I(alloc_inode)->ip_blkno); | 1243 | (unsigned long long)OCFS2_I(alloc_inode)->ip_blkno); |
1244 | 1244 | ||
1245 | status = ocfs2_read_block(OCFS2_SB(alloc_inode->i_sb), | 1245 | status = ocfs2_read_block(alloc_inode, |
1246 | le64_to_cpu(cl->cl_recs[chain].c_blkno), | 1246 | le64_to_cpu(cl->cl_recs[chain].c_blkno), |
1247 | &group_bh, OCFS2_BH_CACHED, alloc_inode); | 1247 | &group_bh, OCFS2_BH_CACHED); |
1248 | if (status < 0) { | 1248 | if (status < 0) { |
1249 | mlog_errno(status); | 1249 | mlog_errno(status); |
1250 | goto bail; | 1250 | goto bail; |
@@ -1272,9 +1272,9 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, | |||
1272 | next_group = le64_to_cpu(bg->bg_next_group); | 1272 | next_group = le64_to_cpu(bg->bg_next_group); |
1273 | prev_group_bh = group_bh; | 1273 | prev_group_bh = group_bh; |
1274 | group_bh = NULL; | 1274 | group_bh = NULL; |
1275 | status = ocfs2_read_block(OCFS2_SB(alloc_inode->i_sb), | 1275 | status = ocfs2_read_block(alloc_inode, |
1276 | next_group, &group_bh, | 1276 | next_group, &group_bh, |
1277 | OCFS2_BH_CACHED, alloc_inode); | 1277 | OCFS2_BH_CACHED); |
1278 | if (status < 0) { | 1278 | if (status < 0) { |
1279 | mlog_errno(status); | 1279 | mlog_errno(status); |
1280 | goto bail; | 1280 | goto bail; |
@@ -1777,7 +1777,6 @@ int ocfs2_free_suballoc_bits(handle_t *handle, | |||
1777 | { | 1777 | { |
1778 | int status = 0; | 1778 | int status = 0; |
1779 | u32 tmp_used; | 1779 | u32 tmp_used; |
1780 | struct ocfs2_super *osb = OCFS2_SB(alloc_inode->i_sb); | ||
1781 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) alloc_bh->b_data; | 1780 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) alloc_bh->b_data; |
1782 | struct ocfs2_chain_list *cl = &fe->id2.i_chain; | 1781 | struct ocfs2_chain_list *cl = &fe->id2.i_chain; |
1783 | struct buffer_head *group_bh = NULL; | 1782 | struct buffer_head *group_bh = NULL; |
@@ -1796,8 +1795,8 @@ int ocfs2_free_suballoc_bits(handle_t *handle, | |||
1796 | (unsigned long long)OCFS2_I(alloc_inode)->ip_blkno, count, | 1795 | (unsigned long long)OCFS2_I(alloc_inode)->ip_blkno, count, |
1797 | (unsigned long long)bg_blkno, start_bit); | 1796 | (unsigned long long)bg_blkno, start_bit); |
1798 | 1797 | ||
1799 | status = ocfs2_read_block(osb, bg_blkno, &group_bh, OCFS2_BH_CACHED, | 1798 | status = ocfs2_read_block(alloc_inode, bg_blkno, &group_bh, |
1800 | alloc_inode); | 1799 | OCFS2_BH_CACHED); |
1801 | if (status < 0) { | 1800 | if (status < 0) { |
1802 | mlog_errno(status); | 1801 | mlog_errno(status); |
1803 | goto bail; | 1802 | goto bail; |