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>
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 052c4cf..a164e09 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -705,8 +705,8 @@
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 @@
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 @@
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 @@
* 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 @@
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 @@
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 @@
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 @@
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;