• Pavel Shilovsky's avatar
    CIFS: Gracefully handle QueryInfo errors during open · 30573a82
    Pavel Shilovsky authored
    Currently if the client identifies problems when processing
    metadata returned in CREATE response, the open handle is being
    leaked. This causes multiple problems like a file missing a lease
    break by that client which causes high latencies to other clients
    accessing the file. Another side-effect of this is that the file
    can't be deleted.
    
    Fix this by closing the file after the client hits an error after
    the file was opened and the open descriptor wasn't returned to
    the user space. Also convert -ESTALE to -EOPENSTALE to allow
    the VFS to revalidate a dentry and retry the open.
    
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    30573a82
file.c 119 KB