Re: [PATCH] ext2: propagate errors from ext2_prepare_chunk

Christoph Hellwig
2023-01-16T16:11:35Z

On Mon, Jan 16, 2023 at 12:16:21PM +0100, Jan Kara wrote:
> > - ext2_set_link(new_dir, new_de, new_page, page_addr, old_inode, 1);
> > + err = ext2_set_link(new_dir, new_de, new_page, page_addr,
> > + old_inode, true);
> > + if (err)
> > + goto out_dir;
> > ext2_put_page(new_page, page_addr);
>
> AFAICT we need to call ext2_put_page(new_page, page_addr) also in case of
> error here. I'll fix it up on commit. Thanks for the patch.

Indeed. I was tricked by out_dir doing the cleanup, but that's for
the old entry.