From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [PATCH 3/17] locks: make ->lock release private data before returning in GETLK case Date: Sun, 8 Apr 2007 14:32:45 -0400 Message-ID: <20070408183245.GA10331@fieldses.org> References: <20070406174618.GC32549@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@osdl.org, Trond Myklebust , Marc Eshel , linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mail.fieldses.org ([66.93.2.214]:58562 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751682AbXDHScy (ORCPT ); Sun, 8 Apr 2007 14:32:54 -0400 Content-Disposition: inline In-Reply-To: <20070406174618.GC32549@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Apr 06, 2007 at 06:46:18PM +0100, Christoph Hellwig wrote: > On Thu, Apr 05, 2007 at 07:40:53PM -0400, J. Bruce Fields wrote: > > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c > > index f52cf5c..d557a51 100644 > > --- a/fs/nfs/nfs4proc.c > > +++ b/fs/nfs/nfs4proc.c > > @@ -3019,6 +3019,8 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock > > status = 0; > > } > > out: > > + if (request->fl_ops) > > + request->fl_ops->fl_release_private(request); > > Don't we know which fl_release_private instace we'll call and could > do a direct call instead? Yeah. It's currently private to another file, but that could obviously be fixed. The fl_ops check is still required, though. I could go either way. --b.