Skip to content

Commit 1f941b2

Browse files
Haoxiang Lichucklever
authored andcommitted
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: 78599c4 ("nfsd4: add file to display list of client's opens") Cc: [email protected] Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Haoxiang Li <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 8f9e967 commit 1f941b2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/nfsd/nfs4state.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3099,8 +3099,10 @@ static int client_states_open(struct inode *inode, struct file *file)
30993099
return -ENXIO;
31003100

31013101
ret = seq_open(file, &states_seq_ops);
3102-
if (ret)
3102+
if (ret) {
3103+
drop_client(clp);
31033104
return ret;
3105+
}
31043106
s = file->private_data;
31053107
s->private = clp;
31063108
return 0;

0 commit comments

Comments
 (0)