linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Dai Ngo <dai.ngo@oracle.com>, chuck.lever@oracle.com
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v4 1/4] locks: allow support for write delegation
Date: Sun, 21 May 2023 12:27:54 -0400	[thread overview]
Message-ID: <b22be4600aec37a3926b814343f331d2783984d7.camel@kernel.org> (raw)
In-Reply-To: <1684618595-4178-2-git-send-email-dai.ngo@oracle.com>

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>

  reply	other threads:[~2023-05-21 16:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-20 21:36 [PATCH v4 0/4] NFSD: add support for NFSv4 write delegation Dai Ngo
2023-05-20 21:36 ` [PATCH v4 1/4] locks: allow support for " Dai Ngo
2023-05-21 16:27   ` Jeff Layton [this message]
2023-05-20 21:36 ` [PATCH v4 2/4] NFSD: enable " Dai Ngo
2023-05-20 21:36 ` [PATCH v4 3/4] NFSD: handle GETATTR conflict with " Dai Ngo
2023-05-21 16:30   ` Chuck Lever III
2023-05-21 16:49   ` Jeff Layton
2023-05-21 18:48     ` dai.ngo
2023-05-21 23:08   ` Jeff Layton
2023-05-22  2:31     ` Chuck Lever
2023-05-22  2:56     ` dai.ngo
2023-05-22  3:56       ` dai.ngo
2023-05-22 13:16         ` Chuck Lever III
2023-05-22 13:49         ` Jeff Layton
2023-05-22 17:10           ` dai.ngo
2023-05-20 21:36 ` [PATCH v4 4/4] NFSD: add trace point to track when write delegation is granted Dai Ngo
2023-05-21 16:08 ` [PATCH v4 0/4] NFSD: add support for NFSv4 write delegation 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=b22be4600aec37a3926b814343f331d2783984d7.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --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).