From: Dai Ngo <dai.ngo@oracle.com>
To: chuck.lever@oracle.com, jlayton@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v6 1/5] locks: allow support for write delegation
Date: Wed, 28 Jun 2023 19:36:12 -0700 [thread overview]
Message-ID: <1688006176-32597-2-git-send-email-dai.ngo@oracle.com> (raw)
In-Reply-To: <1688006176-32597-1-git-send-email-dai.ngo@oracle.com>
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);
--
2.39.3
next prev parent reply other threads:[~2023-06-29 2:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 2:36 [PATCH v6 0/5] NFSD: add support for NFSv4.1+ write delegation Dai Ngo
2023-06-29 2:36 ` Dai Ngo [this message]
2023-06-29 2:36 ` [PATCH v6 2/5] NFSD: Enable write delegation support for NFSv4.1+ client Dai Ngo
2023-06-29 14:54 ` Chuck Lever
2023-06-29 16:15 ` dai.ngo
2023-06-29 2:36 ` [PATCH v6 3/5] NFSD: handle GETATTR conflict with write delegation Dai Ngo
2023-06-29 15:00 ` Chuck Lever
2023-06-29 16:15 ` dai.ngo
2023-06-29 2:36 ` [PATCH v6 4/5] NFSD: allow client to use write delegation stateid for READ Dai Ngo
2023-06-29 15:02 ` Chuck Lever
2023-06-29 15:33 ` Jeff Layton
2023-06-29 16:16 ` dai.ngo
2023-06-29 2:36 ` [PATCH v6 5/5] NFSD: add counter for write delegation recall due to conflict GETATTR Dai Ngo
2023-06-29 15:07 ` Chuck Lever
2023-06-29 16:16 ` dai.ngo
2023-06-29 14:51 ` [PATCH v6 0/5] NFSD: add support for NFSv4.1+ write delegation Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1688006176-32597-2-git-send-email-dai.ngo@oracle.com \
--to=dai.ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox