From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Wed, 05 Dec 2012 16:59:21 +0000 Subject: Re: [patch] vfs: clear to the end of the buffer on reads Message-Id: <20121205165921.GM6568@mwanda> List-Id: References: <20121205124403.GA31930@elgon.mountain> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Linus Torvalds Cc: Alexander Viro , linux-fsdevel , kernel-janitors , Romain Francoise , Meelis Roos , Tony Luck On Wed, Dec 05, 2012 at 07:17:16AM -0800, Linus Torvalds wrote: > On Wed, Dec 5, 2012 at 4:44 AM, Dan Carpenter wrote: > > READ is zero so this test is always false. (rw = READ) was intended. > > Actually, that really *is* a bitmask, but yeah, the test is wrong. > > The correct test is > > ((rw & RW_MASK) = READ) > Ah. Of course. I'll send a v2. regards, dan carpenter