]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/qnx4/namei.c
Merge tag 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[karo-tx-linux.git] / fs / qnx4 / namei.c
index 275327b5615ea0c2fc8485eb7511dce6ec43c643..a512c0b30e8e72a853a5c7711217b2c56778a62f 100644 (file)
@@ -39,10 +39,6 @@ static int qnx4_match(int len, const char *name,
        } else {
                namelen = QNX4_SHORT_NAME_MAX;
        }
-       /* "" means "." ---> so paths like "/usr/lib//libc.a" work */
-       if (!len && (de->di_fname[0] == '.') && (de->di_fname[1] == '\0')) {
-               return 1;
-       }
        thislen = strlen( de->di_fname );
        if ( thislen > namelen )
                thislen = namelen;
@@ -72,7 +68,9 @@ static struct buffer_head *qnx4_find_entry(int len, struct inode *dir,
        block = offset = blkofs = 0;
        while (blkofs * QNX4_BLOCK_SIZE + offset < dir->i_size) {
                if (!bh) {
-                       bh = qnx4_bread(dir, blkofs, 0);
+                       block = qnx4_block_map(dir, blkofs);
+                       if (block)
+                               bh = sb_bread(dir->i_sb, block);
                        if (!bh) {
                                blkofs++;
                                continue;
@@ -80,7 +78,6 @@ static struct buffer_head *qnx4_find_entry(int len, struct inode *dir,
                }
                *res_dir = (struct qnx4_inode_entry *) (bh->b_data + offset);
                if (qnx4_match(len, name, bh, &offset)) {
-                       block = qnx4_block_map( dir, blkofs );
                        *ino = block * QNX4_INODES_PER_BLOCK +
                            (offset / QNX4_DIR_ENTRY_SIZE) - 1;
                        return bh;