net/handshake: use sockfd_put() helper
authorA K M Fazla Mehrab <a.mehrab@bytedance.com>
Mon, 26 Aug 2024 18:26:52 +0000 (18:26 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 27 Aug 2024 23:09:25 +0000 (16:09 -0700)
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>
net/handshake/netlink.c

index 89637e73286666697501db9a6d3cd3f306020842..7e46d130dce2cdcdb97f57d649568fd7897e05a8 100644 (file)
@@ -153,7 +153,7 @@ int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
        if (!req) {
                err = -EBUSY;
                trace_handshake_cmd_done_err(net, req, sock->sk, err);
-               fput(sock->file);
+               sockfd_put(sock);
                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]);
 
        handshake_complete(req, status, info);
-       fput(sock->file);
+       sockfd_put(sock);
        return 0;
 }