summaryrefslogtreecommitdiff
path: root/fs/ocfs2/alloc.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-10-10 04:20:30 +0400
committerMark Fasheh <mfasheh@suse.com>2008-10-14 22:43:29 +0400
commit31d33073ca38603dea705dae45e094a64ca062d6 (patch)
treecf02beb489456ebc9e07bace80e96ad1150f2cbf /fs/ocfs2/alloc.c
parentda1e90985a0e767e44397c9db0937e236033fa58 (diff)
downloadlinux-31d33073ca38603dea705dae45e094a64ca062d6.tar.xz
ocfs2: Require an inode for ocfs2_read_block(s)().
Now that synchronous readers are using ocfs2_read_blocks_sync(), all callers of ocfs2_read_blocks() are passing an inode. Use it unconditionally. Since it's there, we don't need to pass the ocfs2_super either. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r--fs/ocfs2/alloc.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 052c4cf7db95..a164e09491f8 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -705,8 +705,8 @@ int ocfs2_num_free_extents(struct ocfs2_super *osb,
last_eb_blk = ocfs2_et_get_last_eb_blk(et);
if (last_eb_blk) {
- retval = ocfs2_read_block(osb, last_eb_blk,
- &eb_bh, OCFS2_BH_CACHED, inode);
+ retval = ocfs2_read_block(inode, last_eb_blk,
+ &eb_bh, OCFS2_BH_CACHED);
if (retval < 0) {
mlog_errno(retval);
goto bail;
@@ -1176,8 +1176,7 @@ static int ocfs2_find_branch_target(struct ocfs2_super *osb,
brelse(bh);
bh = NULL;
- status = ocfs2_read_block(osb, blkno, &bh, OCFS2_BH_CACHED,
- inode);
+ status = ocfs2_read_block(inode, blkno, &bh, OCFS2_BH_CACHED);
if (status < 0) {
mlog_errno(status);
goto bail;
@@ -1541,8 +1540,7 @@ static int __ocfs2_find_path(struct inode *inode,
brelse(bh);
bh = NULL;
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb), blkno,
- &bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, blkno, &bh, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
@@ -4296,9 +4294,9 @@ static int ocfs2_figure_insert_type(struct inode *inode,
* ocfs2_figure_insert_type() and ocfs2_add_branch()
* may want it later.
*/
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
+ ret = ocfs2_read_block(inode,
ocfs2_et_get_last_eb_blk(et), &bh,
- OCFS2_BH_CACHED, inode);
+ OCFS2_BH_CACHED);
if (ret) {
mlog_exit(ret);
goto out;
@@ -4764,9 +4762,9 @@ static int __ocfs2_mark_extent_written(struct inode *inode,
if (path->p_tree_depth) {
struct ocfs2_extent_block *eb;
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
+ ret = ocfs2_read_block(inode,
ocfs2_et_get_last_eb_blk(et),
- &last_eb_bh, OCFS2_BH_CACHED, inode);
+ &last_eb_bh, OCFS2_BH_CACHED);
if (ret) {
mlog_exit(ret);
goto out;
@@ -4923,9 +4921,9 @@ static int ocfs2_split_tree(struct inode *inode, struct ocfs2_extent_tree *et,
depth = path->p_tree_depth;
if (depth > 0) {
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
+ ret = ocfs2_read_block(inode,
ocfs2_et_get_last_eb_blk(et),
- &last_eb_bh, OCFS2_BH_CACHED, inode);
+ &last_eb_bh, OCFS2_BH_CACHED);
if (ret < 0) {
mlog_errno(ret);
goto out;
@@ -5592,8 +5590,8 @@ static int ocfs2_get_truncate_log_info(struct ocfs2_super *osb,
goto bail;
}
- status = ocfs2_read_block(osb, OCFS2_I(inode)->ip_blkno, &bh,
- OCFS2_BH_CACHED, inode);
+ status = ocfs2_read_block(inode, OCFS2_I(inode)->ip_blkno, &bh,
+ OCFS2_BH_CACHED);
if (status < 0) {
iput(inode);
mlog_errno(status);
@@ -6991,8 +6989,8 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb,
ocfs2_init_dealloc_ctxt(&(*tc)->tc_dealloc);
if (fe->id2.i_list.l_tree_depth) {
- status = ocfs2_read_block(osb, le64_to_cpu(fe->i_last_eb_blk),
- &last_eb_bh, OCFS2_BH_CACHED, inode);
+ status = ocfs2_read_block(inode, le64_to_cpu(fe->i_last_eb_blk),
+ &last_eb_bh, OCFS2_BH_CACHED);
if (status < 0) {
mlog_errno(status);
goto bail;