patch-2.1.37 linux/fs/ext2/namei.c
Next file: linux/fs/ext2/super.c
Previous file: linux/fs/ext2/ioctl.c
Back to the patch index
Back to the overall index
- Lines: 9
- Date:
Mon May 12 10:35:42 1997
- Orig file:
v2.1.36/linux/fs/ext2/namei.c
- Orig date:
Sat Nov 30 02:24:01 1996
diff -u --recursive --new-file v2.1.36/linux/fs/ext2/namei.c linux/fs/ext2/namei.c
@@ -583,7 +583,7 @@
offset = le16_to_cpu(de->rec_len) + le16_to_cpu(de1->rec_len);
de = (struct ext2_dir_entry *) ((char *) de1 + le16_to_cpu(de1->rec_len));
while (offset < inode->i_size ) {
- if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) {
+ if (!bh || (void *) de >= (void *) (bh->b_data + sb->s_blocksize)) {
brelse (bh);
bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err);
if (!bh) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov