Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42796
b: refs/heads/master
c: 40b8513
h: refs/heads/master
v: v3
  • Loading branch information
Eric Sandeen authored and Linus Torvalds committed Dec 7, 2006
1 parent b44124c commit b091798
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59287c0913cc9a6c75712a775f6c1c1ef418ef3b
refs/heads/master: 40b851348fe9bf49c26025b34261d25142269b60
3 changes: 3 additions & 0 deletions trunk/fs/ext3/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ static int ext3_readdir(struct file * filp,
ext3_error (sb, "ext3_readdir",
"directory #%lu contains a hole at offset %lu",
inode->i_ino, (unsigned long)filp->f_pos);
/* corrupt size? Maybe no more blocks to read */
if (filp->f_pos > inode->i_blocks << 9)
break;
filp->f_pos += sb->s_blocksize - offset;
continue;
}
Expand Down
9 changes: 9 additions & 0 deletions trunk/fs/ext3/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,15 @@ static int htree_dirblock_to_tree(struct file *dir_file,
dir->i_sb->s_blocksize -
EXT3_DIR_REC_LEN(0));
for (; de < top; de = ext3_next_entry(de)) {
if (!ext3_check_dir_entry("htree_dirblock_to_tree", dir, de, bh,
(block<<EXT3_BLOCK_SIZE_BITS(dir->i_sb))
+((char *)de - bh->b_data))) {
/* On error, skip the f_pos to the next block. */
dir_file->f_pos = (dir_file->f_pos |
(dir->i_sb->s_blocksize - 1)) + 1;
brelse (bh);
return count;
}
ext3fs_dirhash(de->name, de->name_len, hinfo);
if ((hinfo->hash < start_hash) ||
((hinfo->hash == start_hash) &&
Expand Down

0 comments on commit b091798

Please sign in to comment.