[PATCH v2] block: Don't count_vm_events for discard bio in submit_bio.

From: Tao Ma
Date: Wed Jun 23 2010 - 20:30:24 EST


Hi Andrew,
> Yes, that's a buglet.
>
> Note that Christoph's "[PATCH, RFC] block: don't allocate a payload for
> discard request" will fix it in a better way. That patch is in
> linux-next now, but I expect it will be taken out again (quickly,
> please) because Mike has found a number of problems with it.
ok, I haven't noticed that. thanks for the info.
>
> Your patch looks like a decent temporary fix for mainline, and a
> permanent one for -stable.
I am sorry, but I made a mistake. BIO_RW_DISCARD is a enum for bit offset.
So the right check should be rw & (1 << BIO_RW_DISCARD).
I have regenerated the patch. Sorry for the inconvenience.

Regards,
Tao