ocfs2: Kill the last naked wait_on_buffer() for cached reads.

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>
This commit is contained in:
Joel Becker 2008-10-09 17:20:33 -07:00 коммит произвёл Mark Fasheh
Родитель 07446dc72c
Коммит 5e0b3dec01
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -302,14 +302,13 @@ restart:
} }
if ((bh = bh_use[ra_ptr++]) == NULL) if ((bh = bh_use[ra_ptr++]) == NULL)
goto next; goto next;
wait_on_buffer(bh); if (ocfs2_read_block(dir, block, &bh)) {
if (!buffer_uptodate(bh)) { /* read error, skip block & hope for the best.
/* read error, skip block & hope for the best */ * ocfs2_read_block() has released the bh. */
ocfs2_error(dir->i_sb, "reading directory %llu, " ocfs2_error(dir->i_sb, "reading directory %llu, "
"offset %lu\n", "offset %lu\n",
(unsigned long long)OCFS2_I(dir)->ip_blkno, (unsigned long long)OCFS2_I(dir)->ip_blkno,
block); block);
brelse(bh);
goto next; goto next;
} }
i = ocfs2_search_dirblock(bh, dir, name, namelen, i = ocfs2_search_dirblock(bh, dir, name, namelen,