mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08: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: 78599c42ae ("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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user