Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / fs / ext4 / namei.c
index ede3a33..6047b7f 100644 (file)
@@ -892,6 +892,10 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
                               "falling back\n"));
        }
        nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb);
+       if (!nblocks) {
+               ret = NULL;
+               goto cleanup_and_exit;
+       }
        start = EXT4_I(dir)->i_dir_start_lookup;
        if (start >= nblocks)
                start = 0;