mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
![Alexander Aring](/assets/img/avatar_default.png)
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
40595cdc93
("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: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
18 lines
642 B
C
18 lines
642 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
|
|
*/
|
|
#ifndef __DLM_PLOCK_DOT_H__
|
|
#define __DLM_PLOCK_DOT_H__
|
|
|
|
#include <uapi/linux/dlm_plock.h>
|
|
|
|
int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
|
int cmd, struct file_lock *fl);
|
|
int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
|
struct file_lock *fl);
|
|
int dlm_posix_cancel(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
|
struct file_lock *fl);
|
|
int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
|
struct file_lock *fl);
|
|
#endif
|