]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext4/dir.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / fs / ext4 / dir.c
index f8595787a70e0d70fb570f05fd887e70fa91027a..f2ed3e7fb9f5045566ba212c3238bf1e2c3a707f 100644 (file)
@@ -153,6 +153,9 @@ static int ext4_readdir(struct file * filp,
                        ext4_error (sb, "ext4_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;
                }