Skip to content

Commit

Permalink
ocfs2: Kill the last naked wait_on_buffer() for cached reads.
Browse files Browse the repository at this point in the history
ocfs2's cached buffer I/O goes through ocfs2_read_block(s)().  dir.c had
a naked wait_on_buffer() to wait for some readahead, but it should
use ocfs2_read_block() instead.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
  • Loading branch information
Joel Becker authored and Mark Fasheh committed Oct 14, 2008
1 parent 07446dc commit 5e0b3de
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fs/ocfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,13 @@ static struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen,
}
if ((bh = bh_use[ra_ptr++]) == NULL)
goto next;
wait_on_buffer(bh);
if (!buffer_uptodate(bh)) {
/* read error, skip block & hope for the best */
if (ocfs2_read_block(dir, block, &bh)) {
/* read error, skip block & hope for the best.
* ocfs2_read_block() has released the bh. */
ocfs2_error(dir->i_sb, "reading directory %llu, "
"offset %lu\n",
(unsigned long long)OCFS2_I(dir)->ip_blkno,
block);
brelse(bh);
goto next;
}
i = ocfs2_search_dirblock(bh, dir, name, namelen,
Expand Down

0 comments on commit 5e0b3de

Please sign in to comment.