]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: flush signals before taking down callback thread
authorJeff Layton <jlayton@redhat.com>
Tue, 19 Feb 2008 17:51:35 +0000 (12:51 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 20 Feb 2008 18:32:43 +0000 (13:32 -0500)
commit4418adb95f19828c7bac5e0c4d8c442ef9242673
tree5be4e69ea8f008ec488ac0980470f6acc1da9029
parent4ecb1c3a9a8e27d69f4d419ef94bb4d0a15ac579
NFS: flush signals before taking down callback thread

Now that the reference counting on the callback thread is working as
expected, it uncovers another problem.  Peter Staubach noticed while
testing that patch on an older kernel that he would occasionally see
this printk in rpc_register fire:

    "RPC: failed to contact portmap (errno -512).

The NFSv4 callback thread is signaled by nfs_callback_down(), but never
flushes that signal. All of the shutdown processing is done with that
signal pending. This makes it fail the call to unregister the port with
the portmapper.

In actuality, this rpc_register call isn't necessary at all since the
port isn't actually registered with the portmapper anymore. Regardless,
there doesn't seem to be any reason to leave the signal pending while
the thread is being shut down and flushing it should generally silence
that printk.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/callback.c