aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/extent_map.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-10-09 20:20:31 -0400
committerMark Fasheh <mfasheh@suse.com>2008-10-14 14:51:57 -0400
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 5b482214bb75..2baedac58234 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,
293 struct ocfs2_extent_block *eb; 293 struct ocfs2_extent_block *eb;
294 struct ocfs2_extent_list *el; 294 struct ocfs2_extent_list *el;
295 295
296 ret = ocfs2_read_block(inode, last_eb_blk, 296 ret = ocfs2_read_block(inode, last_eb_blk, &eb_bh);
297 &eb_bh, OCFS2_BH_CACHED);
298 if (ret) { 297 if (ret) {
299 mlog_errno(ret); 298 mlog_errno(ret);
300 goto out; 299 goto out;
@@ -384,7 +383,7 @@ static int ocfs2_figure_hole_clusters(struct inode *inode,
384 383
385 ret = ocfs2_read_block(inode, 384 ret = ocfs2_read_block(inode,
386 le64_to_cpu(eb->h_next_leaf_blk), 385 le64_to_cpu(eb->h_next_leaf_blk),
387 &next_eb_bh, OCFS2_BH_CACHED); 386 &next_eb_bh);
388 if (ret) { 387 if (ret) {
389 mlog_errno(ret); 388 mlog_errno(ret);
390 goto out; 389 goto out;
@@ -631,8 +630,7 @@ int ocfs2_get_clusters(struct inode *inode, u32 v_cluster,
631 if (ret == 0) 630 if (ret == 0)
632 goto out; 631 goto out;
633 632
634 ret = ocfs2_read_block(inode, OCFS2_I(inode)->ip_blkno, 633 ret = ocfs2_read_block(inode, OCFS2_I(inode)->ip_blkno, &di_bh);
635 &di_bh, OCFS2_BH_CACHED);
636 if (ret) { 634 if (ret) {
637 mlog_errno(ret); 635 mlog_errno(ret);
638 goto out; 636 goto out;