• Chuck Lever's avatar
    NFSD: Add nfsd4_encode_lock_owner4() · c4a29c52
    Chuck Lever authored
    To improve readability and better align the LOCK encoders with the
    XDR specification, add an explicit encoder named for the lock_owner4
    type.
    
    In particular, to avoid code duplication, use
    nfsd4_encode_clientid4() to encode the clientid in the lock owner
    rather than open-coding it.
    
    It looks to me like nfs4_set_lock_denied() already clears the
    clientid if it won't return an owner (cf: the nevermind: label). The
    code in the XDR encoder appears to be redundant and can safely be
    removed.
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    c4a29c52
nfs4xdr.c 149 KB