Commit fa60a3cf authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext3: fix error-path handle leak

The ioctl handler can leave a transaction open on an error path.  That
will wedge up the filesystem.
parent 4308a50e
......@@ -119,13 +119,11 @@ int ext3_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
if (IS_ERR(handle))
return PTR_ERR(handle);
err = ext3_reserve_inode_write(handle, inode, &iloc);
if (err)
return err;
inode->i_ctime = CURRENT_TIME;
inode->i_generation = generation;
err = ext3_mark_iloc_dirty(handle, inode, &iloc);
if (err == 0) {
inode->i_ctime = CURRENT_TIME;
inode->i_generation = generation;
err = ext3_mark_iloc_dirty(handle, inode, &iloc);
}
ext3_journal_stop(handle);
return err;
}
......
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