• J
    cifs: consolidate SendReceive response checks · 2c8f981d
    Jeff Layton 提交于
    Further consolidate the SendReceive code by moving the checks run over
    the packet into a separate function that all the SendReceive variants
    can call.
    
    We can also eliminate the check for a receive_len that's too big or too
    small. cifs_demultiplex_thread already checks that and disconnects the
    socket if that occurs, while setting the midStatus to MALFORMED. It'll
    never call this code if that's the case.
    
    Finally do a little cleanup. Use "goto out" on errors so that the flow
    of code in the normal case is more evident. Also switch the logErr
    variable in map_smb_to_linux_error to a bool.
    Reviewed-by: NPavel Shilovsky <piastry@etersoft.ru>
    Signed-off-by: NJeff Layton <jlayton@redhat.com>
    Signed-off-by: NSteve French <sfrench@us.ibm.com>
    2c8f981d
netmisc.c 39.2 KB