[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251207082458.18833-1-lihaoxiang@isrc.iscas.ac.cn>
Date: Sun, 7 Dec 2025 16:24:58 +0800
From: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>
To: cel@...nel.org
Cc: Dai.Ngo@...cle.com,
bfields@...ldses.org,
chuck.lever@...cle.com,
jlayton@...nel.org,
lihaoxiang@...c.iscas.ac.cn,
linux-kernel@...r.kernel.org,
linux-nfs@...r.kernel.org,
neil@...wn.name,
okorniev@...hat.com,
stable@...r.kernel.org,
tom@...pey.com
Subject: Re: [PATCH] nfsd: Drop the client reference in client_states_open()
Hi, Chuck!
Sat, 06 Dec 2025 09:37:44 -0500, Chuck Lever wrote:
> >
> On Sat, Dec 6, 2025, at 2:38 AM, 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")
> An argument could be made that 78599c42ae3c ("nfsd4: add file
> to display list of client's opens") is where the reference
> counting was first broken. Would you mind if I updated the
> Fixes: tag when I apply this?
Thanks for pointing out the incorrect Fixes tag in the patch.
Please feel free to correct it.
-Haoxiang Li
> > 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;
> > --
> > 2.25.1
> --
> Chuck Lever
Powered by blists - more mailing lists