[PATCH v2] UBIFS: fix master node recovery

Artem Bityutskiy dedekind1 at gmail.com
Thu Jul 7 05:55:48 EDT 2011


On Thu, 2011-07-07 at 11:51 +0200, Anatolij Gustschin wrote:
> diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
> index 783d8e0..9d7e387 100644
> --- a/fs/ubifs/recovery.c
> +++ b/fs/ubifs/recovery.c
> @@ -274,7 +274,8 @@ int ubifs_recover_master_node(struct ubifs_info *c)
>  				if (cor1)
>  					goto out_err;
>  				mst = mst1;
> -			} else if (offs1 == 0 && offs2 + sz >= c->leb_size) {
> +			} else if (offs1 == 0 &&
> +				   (c->leb_size - offs2 - sz) < sz) {

Sorry for netpick, but I think you do not have to embrace the expression
into the brackets, and then may be it fits into one line? Anyway, I can
amend it myself, you do not have to send another patch, but you can if
you want.

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list