Commit 2d10c0bb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext3: htree memory leak fix

From Alex Tomas

We started using ext3_dx_readdir() for all dir_index filesystems, because
we want to return entries in hash order always, so that readdir with a
partial read + new entry added before next readdir won't be crazy.

So we now need to free the structure at filp->pricate_data even against
non-indexed directories.
parent 699155e3
......@@ -509,7 +509,7 @@ static int ext3_dx_readdir(struct file * filp,
static int ext3_release_dir (struct inode * inode, struct file * filp)
{
if (is_dx(inode) && filp->private_data)
if (filp->private_data)
ext3_htree_free_dir_info(filp->private_data);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment