[PATCH] [UBI] Volume table update fix
Artem Bityutskiy
dedekind at infradead.org
Mon Jun 22 03:34:28 EDT 2009
On Mon, 2009-06-22 at 10:29 +0300, Artem Bityutskiy wrote:
> > + if (copy > 0)
> > + return 0;
> > + else
> > + return err;
> This is a tricky place, IMO, and deserves a comment. Could we have
> something like:
>
> /*
> * If the first volume table copy has been changed then overall the
> * operation has succeeded, because the change would be there if we now
> * re-attached the UBI device. Thus, return success in this case.
> */
>
This looks a bit more elegant:
/*
* If the first volume table copy has been changed then overall the
* operation has succeeded, because the change would be there if we now
* re-attached the UBI device. Thus, return success in this case.
*/
return copy ? 0 : err;
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list