summaryrefslogtreecommitdiff
path: root/fs/locks.c
diff options
context:
space:
mode:
authorDai Ngo <dai.ngo@oracle.com>2023-06-29 18:52:37 -0700
committerChuck Lever <chuck.lever@oracle.com>2023-08-29 17:45:22 -0400
commitd67cd907cf8ae2cd42e4f3859ad4de4c16d0c2a3 (patch)
tree609a8a83b07f0c2b855fa1a50fc2b2c41903b284 /fs/locks.c
parentf16ff1cafbf1e65cc706af912df90bcc15d39a6c (diff)
locks: allow support for write delegation
Remove the check for F_WRLCK in generic_add_lease to allow file_lock to be used for write delegation. First consumer is NFSD. Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/locks.c b/fs/locks.c
index df8b26a42524..08fb0b4fd4f8 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1729,13 +1729,6 @@ generic_add_lease(struct file *filp, long arg, struct file_lock **flp, void **pr
if (is_deleg && !inode_trylock(inode))
return -EAGAIN;
- if (is_deleg && arg == F_WRLCK) {
- /* Write delegations are not currently supported: */
- inode_unlock(inode);
- WARN_ON_ONCE(1);
- return -EINVAL;
- }
-
percpu_down_read(&file_rwsem);
spin_lock(&ctx->flc_lock);
time_out_leases(inode, &dispose);