Re: [PATCH 4/7] fs/direct-io.c: adjust suspicious bit operation

From: Jeff Moyer
Date: Thu Jun 07 2012 - 10:25:20 EST


Julia Lawall <Julia.Lawall@xxxxxxx> writes:

> From: Julia Lawall <Julia.Lawall@xxxxxxx>
>
> READ is 0, so the result of the bit-and operation is 0. Rewrite with == as
> done elsewhere in the same file.
>
> This problem was found using Coccinelle (http://coccinelle.lip6.fr/).

Interesting catch, that one. Yeah, we don't expect any readahead I/O to
be done via O_DIRECT. The test for rw == READ all over that file seems
fine to me, given that.

Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/