diff options
Diffstat (limited to 'fs/qnx4/dir.c')
-rw-r--r-- | fs/qnx4/dir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/qnx4/dir.c b/fs/qnx4/dir.c index 8b27142a3..0fbae7262 100644 --- a/fs/qnx4/dir.c +++ b/fs/qnx4/dir.c @@ -41,6 +41,11 @@ static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir) while (filp->f_pos < inode->i_size) { bh = bread(inode->i_dev, blknum, QNX4_BLOCK_SIZE); + if(bh==NULL) + { + printk(KERN_ERR "qnx4_readdir: bread failed (%ld)\n", blknum); + break; + } i = (filp->f_pos - (((filp->f_pos >> 6) >> 3) << 9)) & 0x3f; while (i < QNX4_INODES_PER_BLOCK) { offset = i * QNX4_DIR_ENTRY_SIZE; |