net/handshake: use sockfd_put() helper

Replace fput() with sockfd_put() in handshake_nl_done_doit().

Signed-off-by: A K M Fazla Mehrab <a.mehrab@bytedance.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20240826182652.2449359-1-a.mehrab@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
A K M Fazla Mehrab 2024-08-26 18:26:52 +00:00 committed by Jakub Kicinski
parent 3410d0e14f
commit 85d4cf56e9

View File

@ -153,7 +153,7 @@ int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
if (!req) { if (!req) {
err = -EBUSY; err = -EBUSY;
trace_handshake_cmd_done_err(net, req, sock->sk, err); trace_handshake_cmd_done_err(net, req, sock->sk, err);
fput(sock->file); sockfd_put(sock);
return err; return err;
} }
@ -164,7 +164,7 @@ int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
status = nla_get_u32(info->attrs[HANDSHAKE_A_DONE_STATUS]); status = nla_get_u32(info->attrs[HANDSHAKE_A_DONE_STATUS]);
handshake_complete(req, status, info); handshake_complete(req, status, info);
fput(sock->file); sockfd_put(sock);
return 0; return 0;
} }