aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/inode.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-10-09 20:20:29 -0400
committerMark Fasheh <mfasheh@suse.com>2008-10-14 14:29:10 -0400
commitda1e90985a0e767e44397c9db0937e236033fa58 (patch)
tree88d16dd378bf1b180d345a87de95316546af348a /fs/ocfs2/inode.c
parent936b8834366ec05f2a6993f73afd8348cac9718e (diff)
ocfs2: Separate out sync reads from ocfs2_read_blocks()
The ocfs2_read_blocks() function currently handles sync reads, cached, reads, and sometimes cached reads. We're going to add some functionality to it, so first we should simplify it. The uncached, synchronous reads are much easer to handle as a separate function, so we instroduce ocfs2_read_blocks_sync(). Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r--fs/ocfs2/inode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 05ad1186a167..522297033945 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -460,8 +460,11 @@ static int ocfs2_read_locked_inode(struct inode *inode,
460 } 460 }
461 } 461 }
462 462
463 status = ocfs2_read_block(osb, args->fi_blkno, &bh, 0, 463 if (can_lock)
464 can_lock ? inode : NULL); 464 status = ocfs2_read_block(osb, args->fi_blkno, &bh, 0,
465 inode);
466 else
467 status = ocfs2_read_blocks_sync(osb, args->fi_blkno, 1, &bh);
465 if (status < 0) { 468 if (status < 0) {
466 mlog_errno(status); 469 mlog_errno(status);
467 goto bail; 470 goto bail;