From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 3/6] locks: rename lease functions to reflect locks.c conventions Date: Sat, 30 Jun 2007 10:22:43 +0100 Message-ID: <20070630092243.GB22050@infradead.org> References: <6e0beaf3e950494a6903571f0b5c9b61fc7bf650.1183143819.git.bfields@citi.umich.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, "J. Bruce Fields" To: "J. Bruce Fields" Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:47334 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754097AbXF3JWq (ORCPT ); Sat, 30 Jun 2007 05:22:46 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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.