socket: Unify getsockname and getpeername implementation

They are already implemented by the same get_name hook in the protocol
level.  Bring the unification one level up to reduce code duplication
in preparation to supporting these as io_uring operations.

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Gabriel Krisman Bertazi 2025-11-25 16:17:59 -05:00 • committed by Jens Axboe
commit 4677e78800
3 changed files with 16 additions and 47 deletions