From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [PATCH 4/4] leases: remove unneeded variable from fcntl_setlease(). Date: Wed, 23 Apr 2008 18:52:23 -0400 Message-ID: <20080423225223.GI8302@fieldses.org> References: <1208982542-18277-1-git-send-email-richterd@citi.umich.edu> <1208982542-18277-2-git-send-email-richterd@citi.umich.edu> <1208982542-18277-3-git-send-email-richterd@citi.umich.edu> <1208982542-18277-4-git-send-email-richterd@citi.umich.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: "David M. Richter" Return-path: Received: from mail.fieldses.org ([66.93.2.214]:44807 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752281AbYDWWwZ (ORCPT ); Wed, 23 Apr 2008 18:52:25 -0400 Content-Disposition: inline In-Reply-To: <1208982542-18277-4-git-send-email-richterd@citi.umich.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Apr 23, 2008 at 04:29:02PM -0400, David M. Richter wrote: > fcntl_setlease() has a struct dentry* that is used only once; this patch > removes it. Thanks, I've applied all four. It seems to me that generic_setlease() has a lot of special handling for the unlock case. I wonder if it'd work out to be simpler split out as a separate function calling helper functions for common code. --b. > > Signed-off-by: David M. Richter > --- > fs/locks.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/fs/locks.c b/fs/locks.c > index 6a132cd..2e0fa66 100644 > --- a/fs/locks.c > +++ b/fs/locks.c > @@ -1493,8 +1493,7 @@ EXPORT_SYMBOL_GPL(vfs_setlease); > int fcntl_setlease(unsigned int fd, struct file *filp, long arg) > { > struct file_lock fl, *flp = &fl; > - struct dentry *dentry = filp->f_path.dentry; > - struct inode *inode = dentry->d_inode; > + struct inode *inode = filp->f_path.dentry->d_inode; > int error; > > locks_init_lock(&fl); > -- > 1.5.4 >