diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-10-09 17:20:33 -0700 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-10-14 11:58:11 -0700 |
commit | 5e0b3dec0107540244ba343f983ef4f972db20de (patch) | |
tree | b279c196c84abc01b61fcd70ec7aaa7f6e74e78b /fs/ocfs2 | |
parent | 07446dc72cffcc6e2672d0e54061dcd1858725ba (diff) | |
download | linux-5e0b3dec0107540244ba343f983ef4f972db20de.tar.gz linux-5e0b3dec0107540244ba343f983ef4f972db20de.tar.bz2 linux-5e0b3dec0107540244ba343f983ef4f972db20de.zip |
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>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/dir.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index ef2bb856f731..60be3ba1f5dc 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -302,14 +302,13 @@ restart: } 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, |