diff options
| author | Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> | 2025-12-06 15:38:42 +0800 |
|---|---|---|
| committer | Chuck Lever <chuck.lever@oracle.com> | 2025-12-24 21:33:12 -0500 |
| commit | 1f941b2c23fd34c6f3b76d36f9d0a2528fa92b8f (patch) | |
| tree | 283fd93a8ae7c25a95cfbb3e5addfbea9ab9ef46 | |
| parent | 8f9e967830ff32ab7756f530a36adf74a9f12b76 (diff) | |
nfsd: Drop the client reference in client_states_open()
In error path, call drop_client() to drop the reference
obtained by get_nfsdfs_clp().
Fixes: 78599c42ae3c ("nfsd4: add file to display list of client's opens")
Cc: stable@vger.kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
| -rw-r--r-- | fs/nfsd/nfs4state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 8145014d70d5..5b83cb33bf83 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3099,8 +3099,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; |
