patch-2.2.11 linux/fs/qnx4/dir.c

Next file: linux/fs/qnx4/symlinks.c
Previous file: linux/fs/proc/root.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/fs/qnx4/dir.c linux/fs/qnx4/dir.c
@@ -41,6 +41,11 @@
 
 	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 (%d)\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;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)