]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ocfs2/inode.c
ocfs2: Separate out sync reads from ocfs2_read_blocks()
[karo-tx-linux.git] / fs / ocfs2 / inode.c
index 05ad1186a167ccc7cf98fe647aa1dd09f2aaee5d..522297033945564e6301d18de1f3152c5b0c6cfb 100644 (file)
@@ -460,8 +460,11 @@ static int ocfs2_read_locked_inode(struct inode *inode,
                }
        }
 
-       status = ocfs2_read_block(osb, args->fi_blkno, &bh, 0,
-                                 can_lock ? inode : NULL);
+       if (can_lock)
+               status = ocfs2_read_block(osb, args->fi_blkno, &bh, 0,
+                                         inode);
+       else
+               status = ocfs2_read_blocks_sync(osb, args->fi_blkno, 1, &bh);
        if (status < 0) {
                mlog_errno(status);
                goto bail;