Message ID | 1684618595-4178-2-git-send-email-dai.ngo@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | NFSD: add support for NFSv4 write delegation | expand |
On Sat, 2023-05-20 at 14:36 -0700, Dai Ngo wrote: > 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> > --- > fs/locks.c | 7 ------- > 1 file changed, 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); Reviewed-by: Jeff Layton <jlayton@kernel.org>
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);
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> --- fs/locks.c | 7 ------- 1 file changed, 7 deletions(-)