OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] LockD: call per-net shutdown on every global shutdown call
[PATCH] LockD: call per-net shutdown on every global shutdown call [message #45928] Wed, 18 April 2012 13:18 Go to next message
Stanislav Kinsbursky is currently offline  Stanislav Kinsbursky
Messages: 683
Registered: October 2011
Senior Member
From: *parallels.com
Per-net LockD shutdown call must be called regardless of global nlm users
counter.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>

---
fs/lockd/svc.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 1ead075..2ad3715 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -381,10 +381,9 @@ lockd_down(struct net *net)
{
mutex_lock(&nlmsvc_mutex);
if (nlmsvc_users) {
- if (--nlmsvc_users) {
- lockd_down_net(net);
+ lockd_down_net(net);
+ if (--nlmsvc_users)
goto out;
- }
} else {
printk(KERN_ERR "lockd_down: no users! task=%p\n",
nlmsvc_task);
Re: [PATCH] LockD: call per-net shutdown on every global shutdown call [message #45936 is a reply to message #45928] Thu, 19 April 2012 08:30 Go to previous message
Kinsbursky Stanislav is currently offline  Kinsbursky Stanislav
Messages: 5
Registered: December 2011
Junior Member
From: *parallels.com
Please, ignore this patch.
The idea is correct, but current implementation hides few more things to be
modified.
Otherwise kernel oopses.
Sorry.

18.04.2012 17:18, Stanislav Kinsbursky пишет:
> Per-net LockD shutdown call must be called regardless of global nlm users
> counter.
>
> Signed-off-by: Stanislav Kinsbursky<skinsbursky@parallels.com>
>
> ---
> fs/lockd/svc.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> index 1ead075..2ad3715 100644
> --- a/fs/lockd/svc.c
> +++ b/fs/lockd/svc.c
> @@ -381,10 +381,9 @@ lockd_down(struct net *net)
> {
> mutex_lock(&nlmsvc_mutex);
> if (nlmsvc_users) {
> - if (--nlmsvc_users) {
> - lockd_down_net(net);
> + lockd_down_net(net);
> + if (--nlmsvc_users)
> goto out;
> - }
> } else {
> printk(KERN_ERR "lockd_down: no users! task=%p\n",
> nlmsvc_task);
>


--
Best regards,
Stanislav Kinsbursky
Previous Topic: CfP 7th Workshop on Virtualization in High-Performance Cloud Computing (VHPC'12)
Next Topic: [PATCH] SUNRPC: skip dead but not buried clients on PipeFS events
Goto Forum:
  


Current Time: Thu Sep 20 13:01:45 GMT 2018