[Devel] [PATCH RHEL7 COMMIT] Revert "nfs: protect callback execution against per-net callback thread shutdown"
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Dec 17 11:53:42 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-862.20.2.vz7.73.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.20.2.vz7.73.22
------>
commit 08796268e4c94678a0eef981038126d913830531
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Mon Dec 17 11:51:03 2018 +0300
Revert "nfs: protect callback execution against per-net callback thread shutdown"
This reverts commit de5e98aea9d9823ac4e8091c0f1b624e7778fdf5.
Reason of https://jira.sw.ru/browse/PSBM-75751-75751 was found
incorrectly, patch is not required.
The issue will be properly fixed in the scope of
https://jira.sw.ru/browse/PSBM-89609
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
fs/nfs/callback.c | 20 --------------------
include/linux/sunrpc/svc.h | 1 -
2 files changed, 21 deletions(-)
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index feffccf44d08..0beb27579be8 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -99,8 +99,6 @@ nfs4_callback_up(struct svc_serv *serv)
}
#if defined(CONFIG_NFS_V4_1)
-static DEFINE_MUTEX(nfs41_callback_mutex);
-
/*
* The callback service for NFSv4.1 callbacks
*/
@@ -119,12 +117,6 @@ nfs41_callback_svc(void *vrqstp)
if (try_to_freeze())
continue;
- mutex_lock(&nfs41_callback_mutex);
- if (kthread_should_stop()) {
- mutex_unlock(&nfs41_callback_mutex);
- return 0;
- }
-
prepare_to_wait(&serv->sv_cb_waitq, &wq, TASK_INTERRUPTIBLE);
spin_lock_bh(&serv->sv_cb_lock);
if (!list_empty(&serv->sv_cb_list)) {
@@ -137,10 +129,8 @@ nfs41_callback_svc(void *vrqstp)
error = bc_svc_process(serv, req, rqstp);
dprintk("bc_svc_process() returned w/ error code= %d\n",
error);
- mutex_unlock(&nfs41_callback_mutex);
} else {
spin_unlock_bh(&serv->sv_cb_lock);
- mutex_unlock(&nfs41_callback_mutex);
schedule();
finish_wait(&serv->sv_cb_waitq, &wq);
}
@@ -149,13 +139,6 @@ nfs41_callback_svc(void *vrqstp)
return 0;
}
-static void nfs41_callback_down_net(struct svc_serv *serv, struct net *net)
-{
- mutex_lock(&nfs41_callback_mutex);
- bc_svc_flush_queue_net(serv, net);
- mutex_unlock(&nfs41_callback_mutex);
-}
-
/*
* Bring up the NFSv4.1 callback service
*/
@@ -167,7 +150,6 @@ nfs41_callback_up(struct svc_serv *serv)
INIT_LIST_HEAD(&serv->sv_cb_list);
spin_lock_init(&serv->sv_cb_lock);
init_waitqueue_head(&serv->sv_cb_waitq);
- serv->svc_cb_down_net = nfs41_callback_down_net;
rqstp = svc_prepare_thread(serv, &serv->sv_pools[0], NUMA_NO_NODE);
dprintk("--> %s return %d\n", __func__, PTR_ERR_OR_ZERO(rqstp));
return rqstp;
@@ -260,8 +242,6 @@ static void nfs_callback_down_net(u32 minorversion, struct svc_serv *serv, struc
return;
dprintk("NFS: destroy per-net callback data; net=%p\n", net);
- if (serv->svc_cb_down_net)
- serv->svc_cb_down_net(serv, net);
svc_shutdown_net(serv, net);
}
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index c04ef8022019..fe70ff076ad5 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -108,7 +108,6 @@ struct svc_serv {
wait_queue_head_t sv_cb_waitq; /* sleep here if there are no
* entries in the svc_cb_list */
struct svc_xprt *sv_bc_xprt; /* callback on fore channel */
- void (*svc_cb_down_net)(struct svc_serv *serv, struct net *net);
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
};
More information about the Devel
mailing list