aboutsummaryrefslogtreecommitdiff
path: root/fs/ocfs2/extent_map.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-10-09 17:20:31 -0700
committerMark Fasheh <mfasheh@suse.com>2008-10-14 11:51:57 -0700
commit0fcaa56a2a020dd6f90c202b7084e6f4cbedb6c2 (patch)
tree057204016523ce0274d4a23ec02944075f084e8c /fs/ocfs2/extent_map.c
parent31d33073ca38603dea705dae45e094a64ca062d6 (diff)
ocfs2: Simplify ocfs2_read_block()
More than 30 callers of ocfs2_read_block() pass exactly OCFS2_BH_CACHED. Only six pass a different flag set. Rather than have every caller care, let's make ocfs2_read_block() take no flags and always do a cached read. The remaining six places can call ocfs2_read_blocks() directly. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/extent_map.c')
-rw-r--r--fs/ocfs2/extent_map.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
index 5b482214bb7..2baedac5823 100644
--- a/fs/ocfs2/extent_map.c
+++ b/fs/ocfs2/extent_map.c
@@ -293,8 +293,7 @@ static int ocfs2_last_eb_is_empty(struct inode *inode,
struct ocfs2_extent_block *eb;
struct ocfs2_extent_list *el;
- ret = ocfs2_read_block(inode, last_eb_blk,
- &eb_bh, OCFS2_BH_CACHED);
+ ret = ocfs2_read_block(inode, last_eb_blk, &eb_bh);
if (ret) {
mlog_errno(ret);
goto out;
@@ -384,7 +383,7 @@ static int ocfs2_figure_hole_clusters(struct inode *inode,
ret = ocfs2_read_block(inode,
le64_to_cpu(eb->h_next_leaf_blk),
- &next_eb_bh, OCFS2_BH_CACHED);
+ &next_eb_bh);
if (ret) {
mlog_errno(ret);
goto out;
@@ -631,8 +630,7 @@ int ocfs2_get_clusters(struct inode *inode, u32 v_cluster,
if (ret == 0)
goto out;
- ret = ocfs2_read_block(inode, OCFS2_I(inode)->ip_blkno,
- &di_bh, OCFS2_BH_CACHED);
+ ret = ocfs2_read_block(inode, OCFS2_I(inode)->ip_blkno, &di_bh);
if (ret) {
mlog_errno(ret);
goto out;