All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, email200202 <email200202@yahoo.com>,
	NeilBrown <neilb@suse.de>, Jeff Layton <jlayton@kernel.org>,
	Chuck Lever <chuck.lever@oracle.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1 2/4] Revert "nfsd: call nfsd_last_thread() before final nfsd_put()"
Date: Sat, 13 Jan 2024 10:50:40 +0100	[thread overview]
Message-ID: <20240113094204.102630577@linuxfoundation.org> (raw)
In-Reply-To: <20240113094204.017594027@linuxfoundation.org>

6.1-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

This reverts commit bb4f791cb2de1140d0fbcedfe9e791ff364021d7 which is
commit 2a501f55cd641eb4d3c16a2eab0d678693fac663 upstream.

It is reported to cause issues, so revert it.

Reported-by: email200202 <email200202@yahoo.com>
Link: https://lore.kernel.org/r/e341cb408b5663d8c91b8fa57b41bb984be43448.camel@kernel.org
Cc: NeilBrown <neilb@suse.de>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/nfsd/nfsctl.c |    9 ++-------
 fs/nfsd/nfsd.h   |    1 -
 fs/nfsd/nfssvc.c |    2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)

--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -716,10 +716,8 @@ static ssize_t __write_ports_addfd(char
 
 	err = svc_addsock(nn->nfsd_serv, net, fd, buf, SIMPLE_TRANSACTION_LIMIT, cred);
 
-	if (err < 0 && !nn->nfsd_serv->sv_nrthreads && !nn->keep_active)
-		nfsd_last_thread(net);
-	else if (err >= 0 &&
-		 !nn->nfsd_serv->sv_nrthreads && !xchg(&nn->keep_active, 1))
+	if (err >= 0 &&
+	    !nn->nfsd_serv->sv_nrthreads && !xchg(&nn->keep_active, 1))
 		svc_get(nn->nfsd_serv);
 
 	nfsd_put(net);
@@ -769,9 +767,6 @@ out_close:
 		svc_xprt_put(xprt);
 	}
 out_err:
-	if (!nn->nfsd_serv->sv_nrthreads && !nn->keep_active)
-		nfsd_last_thread(net);
-
 	nfsd_put(net);
 	return err;
 }
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -139,7 +139,6 @@ int nfsd_vers(struct nfsd_net *nn, int v
 int nfsd_minorversion(struct nfsd_net *nn, u32 minorversion, enum vers_op change);
 void nfsd_reset_versions(struct nfsd_net *nn);
 int nfsd_create_serv(struct net *net);
-void nfsd_last_thread(struct net *net);
 
 extern int nfsd_max_blksize;
 
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -523,7 +523,7 @@ static struct notifier_block nfsd_inet6a
 /* Only used under nfsd_mutex, so this atomic may be overkill: */
 static atomic_t nfsd_notifier_refcount = ATOMIC_INIT(0);
 
-void nfsd_last_thread(struct net *net)
+static void nfsd_last_thread(struct net *net)
 {
 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
 	struct svc_serv *serv = nn->nfsd_serv;



  parent reply	other threads:[~2024-01-13 10:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-13  9:50 [PATCH 6.1 0/4] 6.1.73-rc1 review Greg Kroah-Hartman
2024-01-13  9:50 ` [PATCH 6.1 1/4] cifs: fix flushing folio regression for 6.1 backport Greg Kroah-Hartman
2024-01-13 20:08   ` Salvatore Bonaccorso
2024-01-13 20:19     ` Greg Kroah-Hartman
2024-01-13 20:24       ` Salvatore Bonaccorso
2024-01-13 20:39         ` Greg Kroah-Hartman
2024-01-13  9:50 ` Greg Kroah-Hartman [this message]
2024-01-13  9:50 ` [PATCH 6.1 3/4] Revert "nfsd: separate nfsd_last_thread() from nfsd_put()" Greg Kroah-Hartman
2024-01-13  9:50 ` [PATCH 6.1 4/4] ipv6: remove max_size check inline with ipv4 Greg Kroah-Hartman
2024-01-13 18:43 ` [PATCH 6.1 0/4] 6.1.73-rc1 review SeongJae Park
2024-01-14 10:34 ` Pavel Machek
2024-01-14 19:38 ` Ron Economos
2024-01-14 22:01 ` Slade Watkins
2024-01-15  8:50 ` Naresh Kamboju
2024-01-15 10:23 ` Jon Hunter
2024-01-15 11:34 ` Shreeya Patel
2024-01-15 12:20 ` Conor Dooley
2024-01-15 19:09 ` Florian Fainelli
2024-01-15 19:46 ` Allen

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=20240113094204.102630577@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=chuck.lever@oracle.com \
    --cc=email200202@yahoo.com \
    --cc=jlayton@kernel.org \
    --cc=neilb@suse.de \
    --cc=patches@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=stable@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 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.