From: Dai Ngo <dai.ngo@oracle.com>
To: chuck.lever@oracle.com, jlayton@kernel.org
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH v5 3/3] locks: allow support for write delegation
Date: Mon, 22 May 2023 16:52:40 -0700 [thread overview]
Message-ID: <1684799560-31663-4-git-send-email-dai.ngo@oracle.com> (raw)
In-Reply-To: <1684799560-31663-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.9.5
next prev parent reply other threads:[~2023-05-23 0:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 23:52 [PATCH v5 0/3] NFSD: add support for NFSv4 write delegation Dai Ngo
2023-05-22 23:52 ` [PATCH v5 1/3] NFSD: enable support for " Dai Ngo
2023-05-24 15:08 ` Jeff Layton
2023-05-22 23:52 ` [PATCH v5 2/3] NFSD: handle GETATTR conflict with " Dai Ngo
2023-05-23 2:43 ` Chuck Lever
2023-05-23 6:02 ` dai.ngo
2023-05-24 17:51 ` Chuck Lever III
2023-05-24 15:07 ` Jeff Layton
2023-05-24 17:49 ` dai.ngo
2023-05-25 17:21 ` Chuck Lever III
2023-05-22 23:52 ` Dai Ngo [this message]
2023-05-24 15:08 ` [PATCH v5 3/3] locks: allow support for " Jeff Layton
2023-05-24 15:09 ` Chuck Lever III
2023-05-24 16:55 ` Jeff Layton
2023-05-24 17:41 ` Chuck Lever III
2023-05-24 18:05 ` dai.ngo
2023-05-24 19:03 ` Jeff Layton
2023-05-24 20:27 ` dai.ngo
2023-05-24 17:52 ` dai.ngo
2023-06-12 16:14 ` [PATCH v5 0/3] NFSD: add support for NFSv4 " Chuck Lever III
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=1684799560-31663-4-git-send-email-dai.ngo@oracle.com \
--to=dai.ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.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;
as well as URLs for NNTP newsgroup(s).