nlm_shutdown_hosts_net() cleanup
authorVasily Averin <vvs@virtuozzo.com>
Mon, 30 Oct 2017 13:47:58 +0000 (16:47 +0300)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 27 Nov 2017 21:45:11 +0000 (16:45 -0500)
nlm_complain_hosts() walks through nlm_server_hosts hlist, which should
be protected by nlm_host_mutex.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/lockd/host.c

index f90f6d5082ef554570a8cdcc44779aeff38929b8..826a89184f90fc7d104980b15922dfa565146cf1 100644 (file)
@@ -621,9 +621,8 @@ nlm_shutdown_hosts_net(struct net *net)
 
        /* Then, perform a garbage collection pass */
        nlm_gc_hosts(net);
-       mutex_unlock(&nlm_host_mutex);
-
        nlm_complain_hosts(net);
+       mutex_unlock(&nlm_host_mutex);
 }
 
 /*