From b783577bb1fff6982bc10facfb4bd87a26f87ecf Mon Sep 17 00:00:00 2001 From: Joel Becker Date: Thu, 9 Oct 2008 17:20:33 -0700 Subject: [PATCH] --- yaml --- r: 114417 b: refs/heads/master c: 5e0b3dec0107540244ba343f983ef4f972db20de h: refs/heads/master i: 114415: c7ca4c274093ac235fc5b5cbaea7143dc37fb29b v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/dir.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d3fa6e9328ba..f0a3cd7bc46f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 07446dc72cffcc6e2672d0e54061dcd1858725ba +refs/heads/master: 5e0b3dec0107540244ba343f983ef4f972db20de diff --git a/trunk/fs/ocfs2/dir.c b/trunk/fs/ocfs2/dir.c index ef2bb856f731..60be3ba1f5dc 100644 --- a/trunk/fs/ocfs2/dir.c +++ b/trunk/fs/ocfs2/dir.c @@ -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,