• Chuck Lever's avatar
    NFSD: Clean up splice actor · c7e0b781
    Chuck Lever authored
    A few useful observations:
    
     - The value in @size is never modified.
    
     - splice_desc.len is an unsigned int, and so is xdr_buf.page_len.
       An implicit cast to size_t is unnecessary.
    
     - The computation of .page_len is the same in all three arms
       of the "if" statement, so hoist it out to make it clear that
       the operation is an unconditional invariant.
    
    The resulting function is 18 bytes shorter on my system (-Os).
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Reviewed-by: default avatarNeilBrown <neilb@suse.de>
    c7e0b781
vfs.c 58.6 KB