Messages in this thread |  | | | Date | Wed, 13 Feb 2008 16:07:59 -0800 | | From | Yinghai Lu <> | | Subject | Re: [PATCH] SCSI: fix data corruption caused by ses | |
On Wednesday 13 February 2008 03:25:27 pm James Bottomley wrote:
> On Tue, 2008-02-12 at 23:10 -0800, Yinghai Lu wrote:
> > if (type_ptr[0] != ENCLOSURE_COMPONENT_DEVICE &&
> > type_ptr[0] != ENCLOSURE_COMPONENT_ARRAY_DEVICE)
> > - continue;
> > + goto next;
> > +
> > ecomp = enclosure_component_register(edev,
> > components++,
> > type_ptr[0],
> > name);
> > +
> > + if (desc_ptr && !IS_ERR(ecomp) && addl_desc_ptr)
> > + ses_process_descriptor(ecomp,
> > + addl_desc_ptr);
> > + next:
> > if (desc_ptr) {
> > desc_ptr += len;
> > - if (!IS_ERR(ecomp))
> > - ses_process_descriptor(ecomp,
> > - addl_desc_ptr);
> >
> > if (addl_desc_ptr)
> > addl_desc_ptr += addl_desc_ptr[1] + 2;
>
> Everything looks fine, thanks, except this piece.
>
> That
>
> if (x)
> goto next;
> ...
> next:
>
> Needs to be
>
> if (!x) {
> ...
> }
>
find other problems about sub_enclosure...
will send you updated one.
YH
|  |