]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/dir.c
ocfs2: Kill the last naked wait_on_buffer() for cached reads.
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / dir.c
index ef2bb856f731880feaaf859b6a5eeaf37cf809a4..60be3ba1f5dc4ef540f75232698bb5df9ec60874 100644 (file)
@@ -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,