From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [PATCH 4/7] fs/direct-io.c: adjust suspicious bit operation Date: Thu, 07 Jun 2012 10:24:46 -0400 Message-ID: References: <1339018901-28439-1-git-send-email-Julia.Lawall@lip6.fr> <1339018901-28439-5-git-send-email-Julia.Lawall@lip6.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , kernel-janitors@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, joe@perches.com, Julia Lawall To: Julia Lawall Return-path: In-Reply-To: <1339018901-28439-5-git-send-email-Julia.Lawall@lip6.fr> (Julia Lawall's message of "Wed, 6 Jun 2012 23:41:38 +0200") Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Julia Lawall writes: > From: Julia Lawall > > 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