Re: [PATCH] 5/5: Device-mapper: dm-zero
From: Christophe Saout
Date: Wed Jun 02 2004 - 11:19:13 EST
Am Mi, den 02.06.2004 um 18:09 Uhr +0200 schrieb Jens Axboe:
> On Wed, Jun 02 2004, Christophe Saout wrote:
> > Am Mi, den 02.06.2004 um 16:46 Uhr +0100 schrieb Alasdair G Kergon:
> >
> > > + bio_for_each_segment(bv, bio, i) {
> > > + char *data = bvec_kmap_irq(bv, &flags);
> > > + memset(data, 0, bv->bv_len);
> >
> > I just noticed, there's a
> >
> > flush_dcache_page(bv->bv_page);
> >
> > missing here.
> >
> > > + bvec_kunmap_irq(bv, &flags);
>
> and even worse, passing bad argument to bvec_kunmap_irq().
Oops. Right.
> extern inline void bvec_kunmap_irq(char *buffer, unsigned long *flags)
> {
> unsigned long ptr = (unsigned long) buffer & PAGE_MASK;
>
> kunmap_atomic((void *) ptr, KM_BIO_SRC_IRQ);
> local_irq_restore(*flags);
> }
What does this & PAGE_MASK do? This looks wrong too.
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil