95d90a0 dlm_controld: fix plock dev_write no op

Authored and Committed by teigland 12 years ago
    dlm_controld: fix plock dev_write no op
    
    When a plock unlock is received due to the file
    being closed (the CLOSE flag is set), we should
    not write an unlock result back to the kernel.
    If we do, the kernel, which does not expect a
    reply, will report the error "dev_write no op".
    
    In cases where dlm_controld encounters and error
    handling the unlock operation, it was writing
    the error result back to the kernel, even though
    the unlock was flagged with CLOSE.  The fix is
    to check for the CLOSE flag and skip writing
    the error result, as we do with normal results.
    
    This problem is especially visible when using
    flocks (not plocks).  This is because the kernel
    generates extraneous plock unlock requests
    when files are closed with flocks.  Because
    dlm_controld finds no plocks on the files,
    it replies to the kernel with an error, rather
    than skipping the reply to do CLOSE.
    
    bz 731775
    
    Signed-off-by: David Teigland <teigland@redhat.com>
    
        
file modified
+4 -2