• Chuck Lever's avatar
    NFSD: Clean up nfsd4_encode_copy_notify() · 21d316a7
    Chuck Lever authored
    Replace open-coded encoding logic with the use of conventional XDR
    utility functions.
    
    Note that if we replace the cpn_sec and cpn_nsec fields with a
    single struct timespec64 field, the encoder can use
    nfsd4_encode_nfstime4(), as that is the data type specified by the
    XDR spec.
    
    NFS4ERR_INVAL seems inappropriate if the encoder doesn't support
    encoding the response. Instead use NFS4ERR_SERVERFAULT, since this
    condition is a software bug on the server.
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    21d316a7
xdr4.h 29.4 KB