mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
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>
This commit is contained in:
parent
8f9e967830
commit
1f941b2c23
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user