From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: file locks: Use wait_event_interruptible_timeout() Date: Tue, 15 Jan 2008 08:04:47 -0700 Message-ID: <20080115150447.GZ18741@parisc-linux.org> References: <48611B2F-1587-48C5-9F30-8DCFA1121CF6@Sun.COM> <20071129190848.GA17907@fieldses.org> <71BCABE5-52AD-4573-8DC0-5C57152A397B@Sun.COM> <20080114204419.GD16926@fieldses.org> <20080115042605.GT18741@parisc-linux.org> <20080115042830.GU18741@parisc-linux.org> <20080115144851.GB10971@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Oleg Drokin , linux-fsdevel@vger.kernel.org To: "J. Bruce Fields" Return-path: Received: from palinux.external.hp.com ([192.25.206.14]:43911 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791AbYAOPEs (ORCPT ); Tue, 15 Jan 2008 10:04:48 -0500 Content-Disposition: inline In-Reply-To: <20080115144851.GB10971@fieldses.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jan 15, 2008 at 09:48:51AM -0500, J. Bruce Fields wrote: > On Mon, Jan 14, 2008 at 09:28:30PM -0700, Matthew Wilcox wrote: > > interruptible_sleep_on_locked() is just an open-coded > > wait_event_interruptible_timeout() with a few assumptions since we know > > we hold the BKL. locks_block_on_timeout() is only used in one place, so > > it's actually simpler to inline it into its caller. > > Makes sense, thanks. So the assumption we were depending on the BKL for > was that we could count on the wake-up not coming till after we block, > so we could skip a check ->fl_next that's normally needed to resolve the > usual sleeping-on-some-condition race? That's right. -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."