Re: [PATCH 5/5] pnfsblock: add missing rpc_put_mount and path_put

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 17, 2011 at 12:14 AM, Jim Rees <rees@xxxxxxxxx> wrote:
> From: Peng Tao <bergwolf@xxxxxxxxx>
>
> Reported-by: Jeff Layton <jlayton@xxxxxxxxxx>
This should really be
Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
as Jeff has provided it in his previous mail.

Thanks,
Tao
> Signed-off-by: Peng Tao <peng_tao@xxxxxxx>
> Signed-off-by: Jim Rees <rees@xxxxxxxxx>
> ---
>  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 7aace44..fef125d2 100644
> --- a/fs/nfs/blocklayout/blocklayout.c
> +++ b/fs/nfs/blocklayout/blocklayout.c
> @@ -1000,17 +1000,20 @@ static int __init nfs4blocklayout_init(void)
>                              mnt,
>                              NFS_PIPE_DIRNAME, 0, &path);
>        if (ret)
> -               goto out_remove;
> +               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_remove;
> +               goto out_putrpc;
>        }
>  out:
>        return ret;
>
> +out_putrpc:
> +       rpc_put_mount();
>  out_remove:
>        pnfs_unregister_layoutdriver(&blocklayout_type);
>        return ret;
> @@ -1023,6 +1026,7 @@ static void __exit nfs4blocklayout_exit(void)
>
>        pnfs_unregister_layoutdriver(&blocklayout_type);
>        rpc_unlink(bl_device_pipe);
> +       rpc_put_mount();
>  }
>
>  MODULE_ALIAS("nfs-layouttype4-3");
> --
> 1.7.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Thanks,
-Bergwolf
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux