Re: [PATCH] ext2: propagate errors from ext2_prepare_chunk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon 16-01-23 09:52:05, Christoph Hellwig wrote:
> Propagate errors from ext2_prepare_chunk to the callers and handle them
> there.  While touching the prototype also turn update_times into a bool
> from the current int used as bool.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>


> diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
> index c056957221a225..18b3d5af77240b 100644
> --- a/fs/ext2/namei.c
> +++ b/fs/ext2/namei.c
> @@ -370,7 +370,10 @@ static int ext2_rename (struct user_namespace * mnt_userns,
>  			err = PTR_ERR(new_de);
>  			goto out_dir;
>  		}
> -		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.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux