OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-130-g17b16cb

Gerrit Code Review gerrit@openafs.org
Sun, 30 Jan 2022 22:33:25 -0500


The following commit has been merged in the master branch:
commit 17b16cb3989d1f41e314795515daf6c9b41cf1de
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Thu Jan 27 14:49:15 2022 -0600

    UKERNEL: Remove socket -> usr_socket redirection
    
    Currently, src/afs/UKERNEL/sysincludes.h #defines 'socket' to
    'usr_socket', in order for 'struct socket' declarations to use struct
    usr_socket. Redefining a simple word/function like 'socket' can easily
    cause issues, and currently makes it difficult to introduce libroken
    callers in UKERNEL code. There are already several instances of
    '#undef socket' in the tree for UKERNEL, suggesting that this wasn't a
    good idea to start with.
    
    Fortunately, this redefinition of 'socket' in UKERNEL seems
    unnecessary, since the only place 'struct usr_socket' is actually
    deferenced is inside src/rx/UKERNEL/rx_knet.c. So we can treat 'struct
    usr_socket' as a struct definition that's just internal to rx_knet.c,
    and no other code even needs to know about the struct, or think that
    it's equivalent to 'struct socket'.
    
    Most code in rx_knet.c already explicitly casts between 'struct
    socket' and 'struct usr_socket'. The only exception is rxi_Recvmsg
    starting in commits near 27c42be1 (ukernel-rx-knet-deref-20060126),
    but this is easily fixed by adding an additional explicit cast.
    
    Change-Id: I4a2af32b33a86a10750d569ac3c91d0c79f49459
    Reviewed-on: https://gerrit.openafs.org/14887
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 src/afs/UKERNEL/sysincludes.h | 8 --------
 src/rx/UKERNEL/rx_knet.c      | 9 +++++++--
 src/rx/rx_getaddr.c           | 1 -
 3 files changed, 7 insertions(+), 11 deletions(-)

-- 
OpenAFS Master Repository