• Alexander Aring's avatar
    fs: dlm: fix F_CANCELLK to cancel pending request · dc52cd2e
    Alexander Aring authored
    This patch fixes the current handling of F_CANCELLK by not just doing a
    unlock as we need to try to cancel a lock at first. A unlock makes sense
    on a non-blocking lock request but if it's a blocking lock request we
    need to cancel the request until it's not granted yet. This patch is fixing
    this behaviour by first try to cancel a lock request and if it's failed
    it's unlocking the lock which seems to be granted.
    
    Note: currently the nfs locking handling was disabled by commit
    40595cdc ("nfs: block notification on fs with its own ->lock").
    However DLM was never being updated regarding to this change. Future
    patches will try to fix lockd lock requests for DLM. This patch is
    currently assuming the upstream DLM lockd handling is correct.
    Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
    Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
    dc52cd2e
stack_user.c 28.6 KB