patch-2.1.36 linux/fs/isofs/namei.c

Next file: linux/fs/lockd/host.c
Previous file: linux/fs/isofs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/fs/isofs/namei.c linux/fs/isofs/namei.c
@@ -98,6 +98,12 @@
 			offset = 0;
 			f_pos = ((f_pos & ~(ISOFS_BLOCK_SIZE - 1))
 				 + ISOFS_BLOCK_SIZE);
+
+			if( f_pos >= dir->i_size )
+			  {
+			    return 0;
+			  }
+
 			block = isofs_bmap(dir,f_pos>>bufbits);
 			if (!block || !(bh = bread(dir->i_dev,block,bufsize)))
 				return 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov