Skip to content

Commit

Permalink
fs: dlm: use sk->sk_socket instead of con->sock
Browse files Browse the repository at this point in the history
Instead of dereference "con->sock" we can get the socket structure over
"sk->sk_socket" as well. This patch will switch to this behaviour.

Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
Alexander Aring authored and teigland committed Jul 19, 2021
1 parent 2734d6c commit feb704b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,7 @@ static void lowcomms_error_report(struct sock *sk)
goto out;

orig_report = listen_sock.sk_error_report;
if (con->sock == NULL ||
kernel_getpeername(con->sock, (struct sockaddr *)&saddr) < 0) {
if (kernel_getpeername(sk->sk_socket, (struct sockaddr *)&saddr) < 0) {
printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
"sending to node %d, port %d, "
"sk_err=%d/%d\n", dlm_our_nodeid(),
Expand Down

0 comments on commit feb704b

Please sign in to comment.