From: Dave Wysochanski <dwysocha@redhat.com>
To: trondmy@hammerspace.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH] SUNRPC: Fix possible autodisconnect during connect due to stale last_used
Date: Wed, 26 Jun 2019 15:50:06 -0400 [thread overview]
Message-ID: <1561578606-24602-1-git-send-email-dwysocha@redhat.com> (raw)
When a connection is successful ensure last_used is updated before calling
xprt_schedule_autodisconnect inside xprt_unlock_connect. This avoids a
possible xprt_autoclose firing immediately after connect sequence due to
an old value of last_used given to mod_timer in xprt_schedule_autodisconnect.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
---
net/sunrpc/xprt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index f6c82b1..fceaede 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -800,6 +800,7 @@ void xprt_unlock_connect(struct rpc_xprt *xprt, void *cookie)
goto out;
xprt->snd_task =NULL;
xprt->ops->release_xprt(xprt, NULL);
+ xprt->last_used = jiffies;
xprt_schedule_autodisconnect(xprt);
out:
spin_unlock_bh(&xprt->transport_lock);
--
1.8.3.1
next reply other threads:[~2019-06-26 19:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 19:50 Dave Wysochanski [this message]
2019-06-26 20:11 ` [PATCH] SUNRPC: Fix possible autodisconnect during connect due to stale last_used Trond Myklebust
2019-06-26 20:14 ` Dave Wysochanski
2019-06-26 20:30 ` [PATCH] SUNRPC: Fix possible autodisconnect during connect due to old last_used Dave Wysochanski
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=1561578606-24602-1-git-send-email-dwysocha@redhat.com \
--to=dwysocha@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@hammerspace.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox