From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [PATCH 3/6] locks: rename lease functions to reflect locks.c conventions Date: Wed, 4 Jul 2007 17:42:40 -0400 Message-ID: <20070704214240.GB26764@fieldses.org> References: <6e0beaf3e950494a6903571f0b5c9b61fc7bf650.1183143819.git.bfields@citi.umich.edu> <20070630092243.GB22050@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mail.fieldses.org ([66.93.2.214]:45189 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755833AbXGDVmp (ORCPT ); Wed, 4 Jul 2007 17:42:45 -0400 Content-Disposition: inline In-Reply-To: <20070630092243.GB22050@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sat, Jun 30, 2007 at 10:22:43AM +0100, Christoph Hellwig wrote: > On Fri, Jun 29, 2007 at 03:21:27PM -0400, J. Bruce Fields wrote: > > From: J. Bruce Fields > > > > We've been using the convention that vfs_foo is the function that calls > > a filesystem-specific foo method if it exists, or falls back on a > > generic method if it doesn't. > > > > So rename setlease to vfs_setlease, and __setlease to setlease. Keep > > setlease exported to allow filesystems to use the generic method in > > addition to doing their own bookkeeping. > > This should be moved before patch 2 and can probably go in once 2.6.23 > opens aswell. > > > @@ -1339,7 +1339,7 @@ int fcntl_getlease(struct file *filp) > > * > > * Called with kernel lock held. > > */ > > -static int __setlease(struct file *filp, long arg, struct file_lock **flp) > > +int setlease(struct file *filp, long arg, struct file_lock **flp) > > Except this shouldn't be made non-static in this patch. > > > extern int setlease(struct file *, long, struct file_lock **); > > And this prototype shouldn't be kept. If you want to use it somewhere > later in the patch series make it non-static and export it in a separate > patch. If it's ever intended to be export it should probably get a > better name aswell, e.g. generic_setlease. OK, done.--b.