linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: Peng Tao <bergwolf@gmail.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	Jim Rees <rees@umich.edu>, Benny Halevy <bhalevy@tonian.com>,
	linux-nfs@vger.kernel.org, Peng Tao <peng_tao@emc.com>
Subject: Re: [PATCH] pnfsblock: add missing rpc_put_mount and path_put
Date: Tue, 13 Sep 2011 12:44:01 -0400	[thread overview]
Message-ID: <20110913124401.17aefea5@tlielax.poochiereds.net> (raw)
In-Reply-To: <1315930586-2793-1-git-send-email-bergwolf@gmail.com>

On Tue, 13 Sep 2011 09:16:26 -0700
Peng Tao <bergwolf@gmail.com> wrote:

> Reported-by: Jeff Layton <jlayton@redhat.com>
> Signed-off-by: Peng Tao <peng_tao@emc.com>
> ---
>  fs/nfs/blocklayout/blocklayout.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
> index cc78e62..66f2f73 100644
> --- a/fs/nfs/blocklayout/blocklayout.c
> +++ b/fs/nfs/blocklayout/blocklayout.c
> @@ -1009,17 +1009,20 @@ static int __init nfs4blocklayout_init(void)
>  			      mnt,
>  			      NFS_PIPE_DIRNAME, 0, &path);
>  	if (ret)
> -		goto out_stop;
> +		goto out_putrpc;
>  
>  	bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL,
>  				    &bl_upcall_ops, 0);
> +	path_put(&path);
>  	if (IS_ERR(bl_device_pipe)) {
>  		ret = PTR_ERR(bl_device_pipe);
> -		goto out_stop;
> +		goto out_putrpc;
>  	}
>  out:
>  	return ret;
>  
> +out_putrpc:
> +	rpc_put_mount();
>  out_stop:
>  	pnfsiod_stop();
>  out_remove:
> @@ -1035,6 +1038,7 @@ static void __exit nfs4blocklayout_exit(void)
>  	pnfs_unregister_layoutdriver(&blocklayout_type);
>  	pnfsiod_stop();
>  	rpc_unlink(bl_device_pipe);
> +	rpc_put_mount();
>  }
>  
>  MODULE_ALIAS("nfs-layouttype4-3");

Looks correct. Thanks.

Reviewed-by: Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2011-09-13 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 16:16 [PATCH] pnfsblock: add missing rpc_put_mount and path_put Peng Tao
2011-09-13 16:44 ` Jeff Layton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-13 20:24 Jim Rees
2011-09-14 10:19 ` Benny Halevy
2011-09-19  1:09   ` Myklebust, Trond
2011-09-19  2:04     ` Jim Rees
2011-09-19  2:06       ` Myklebust, Trond
2011-09-19  3:01         ` Benny Halevy

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=20110913124401.17aefea5@tlielax.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bergwolf@gmail.com \
    --cc=bhalevy@tonian.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=peng_tao@emc.com \
    --cc=rees@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).