Commit 1f941b2c authored by Haoxiang Li's avatar Haoxiang Li Committed by Chuck Lever
Browse files

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: 78599c42 ("nfsd4: add file to display list of client's opens")
Cc: stable@vger.kernel.org
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarHaoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 8f9e9678
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;