Re: [bug] ata subsystem related crash with latest -git

Jens Axboe
2007-10-18T17:11:29Z

On Thu, Oct 18 2007, Jens Axboe wrote:
> On Thu, Oct 18 2007, Linus Torvalds wrote:
> >
> >
> > On Thu, 18 Oct 2007, Jens Axboe wrote:
> > > - unsigned long addr = page_to_phys(s->page) + s->offset;
> > > + unsigned long addr = page_to_phys(sg_page(s)) + s->offset;
> >
> > Umm. May I suggest (I haven't read the whole thread yet, maybe somebody
> > else already did) that
> >
> > static inline unsigned long sg_phys(struct scatterlist *sg)
> > {
> > return page_to_phys(sg_page(sg)) + sg->offset;
> > }
> >
> > would be a good thing to have?
>
> Sure thing, it's used quite a lot.

Actually, only 11 occurrences in the patch. But still a nice little
cleanup.

--
Jens Axboe