linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: "David M. Richter" <richterd@citi.umich.edu>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 4/4] leases: remove unneeded variable from fcntl_setlease().
Date: Wed, 23 Apr 2008 18:52:23 -0400	[thread overview]
Message-ID: <20080423225223.GI8302@fieldses.org> (raw)
In-Reply-To: <1208982542-18277-4-git-send-email-richterd@citi.umich.edu>

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 <richterd@citi.umich.edu>
> ---
>  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
> 

  reply	other threads:[~2008-04-23 22:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 20:28 [PATCH 1/4] leases: fix a return-value mixup David M. Richter
2008-04-23 20:29 ` [PATCH 2/4] leases: when unlocking, skip locking-related steps David M. Richter
2008-04-23 20:29   ` [PATCH 3/4] leases: move lock allocation earlier in generic_setlease() David M. Richter
2008-04-23 20:29     ` [PATCH 4/4] leases: remove unneeded variable from fcntl_setlease() David M. Richter
2008-04-23 22:52       ` J. Bruce Fields [this message]
2008-04-24 14:32   ` [PATCH 2/4] leases: when unlocking, skip locking-related steps Chuck Lever
2008-04-24 20:41     ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080423225223.GI8302@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=richterd@citi.umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).