[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4263ceeab14cb5fdc8b0cc90496648ca195cbc8e.camel@kernel.org>
Date: Sun, 07 Dec 2025 03:43:04 +0900
From: Jeff Layton <jlayton@...nel.org>
To: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>, chuck.lever@...cle.com,
neil@...wn.name, okorniev@...hat.com, Dai.Ngo@...cle.com, tom@...pey.com,
bfields@...ldses.org
Cc: linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] nfsd: Drop the client reference in client_states_open()
On Sat, 2025-12-06 at 15:38 +0800, Haoxiang Li wrote:
> In error path, call drop_client() to drop the reference
> obtained by get_nfsdfs_clp().
>
> Fixes: a204f25e372d ("nfsd: create get_nfsdfs_clp helper")
> Cc: stable@...r.kernel.org
> Signed-off-by: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>
> ---
> fs/nfsd/nfs4state.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 8a6960500217..caa0756b6914 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -3097,8 +3097,10 @@ static int client_states_open(struct inode *inode, struct file *file)
> return -ENXIO;
>
> ret = seq_open(file, &states_seq_ops);
> - if (ret)
> + if (ret) {
> + drop_client(clp);
> return ret;
> + }
> s = file->private_data;
> s->private = clp;
> return 0;
Nice catch.
Reviewed-by: Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists