From: Jeff Layton <jlayton@redhat.com>
To: Benjamin Coddington <bcodding@redhat.com>,
Trond Myklebust <trond.myklebust@primarydata.com>,
Anna Schumaker <anna.schumaker@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFSv4: Don't add a new lock on an interrupted wait for LOCK
Date: Tue, 01 Aug 2017 16:12:00 -0400 [thread overview]
Message-ID: <1501618320.4702.14.camel@redhat.com> (raw)
In-Reply-To: <52d3e3b1547ca33b59349c40ae5236bbb8993729.1500658655.git.bcodding@redhat.com>
On Fri, 2017-07-21 at 13:38 -0400, Benjamin Coddington wrote:
> If the wait for a LOCK operation is interrupted, and then the file is
> closed, the locks cleanup code will assume that no new locks will be added
> to the inode after it has completed. We already have a mechanism to detect
> if there was an interrupt, so let's use that to avoid recreating the local
> lock once the RPC completes.
>
nit: "if there was a signal"
> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
> ---
> fs/nfs/nfs4proc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index dbfa18900e25..5256f429c268 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -6100,7 +6100,7 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata)
> case 0:
> renew_lease(NFS_SERVER(d_inode(data->ctx->dentry)),
> data->timestamp);
> - if (data->arg.new_lock) {
> + if (data->arg.new_lock && !data->cancelled) {
> data->fl.fl_flags &= ~(FL_SLEEP | FL_ACCESS);
> if (locks_lock_inode_wait(lsp->ls_state->inode, &data->fl) < 0) {
> rpc_restart_call_prepare(task);
Patch looks fine though:
Reviewed-by: Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2017-08-01 20:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 17:38 [PATCH] NFSv4: Don't add a new lock on an interrupted wait for LOCK Benjamin Coddington
2017-08-01 20:12 ` Jeff Layton [this message]
2017-08-02 11:27 ` [PATCH v2] " Benjamin Coddington
2017-08-23 20:11 ` Benjamin Coddington
2017-08-23 20:15 ` Trond Myklebust
2017-08-23 20:25 ` Benjamin Coddington
2017-08-23 20:27 ` Benjamin Coddington
-- strict thread matches above, loose matches on Subject: below --
2018-05-03 11:12 [PATCH] " Benjamin Coddington
2018-05-29 14:02 ` Trond Myklebust
2018-05-30 13:18 ` Benjamin Coddington
2018-07-29 14:33 ` 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=1501618320.4702.14.camel@redhat.com \
--to=jlayton@redhat.com \
--cc=anna.schumaker@netapp.com \
--cc=bcodding@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.