NFSD: Clear signals before exiting the nfsd() thread Fixes the error "RPC: failed to contact portmap (errno -512)." when the server later tries to unregister from the portmapper. Signed-off-by: Trond Myklebust --- nfssvc.c | 2 ++ 1 files changed, 2 insertions(+) Index: linux-2.6.12-rc3/fs/nfsd/nfssvc.c =================================================================== --- linux-2.6.12-rc3.orig/fs/nfsd/nfssvc.c +++ linux-2.6.12-rc3/fs/nfsd/nfssvc.c @@ -246,6 +246,8 @@ nfsd(struct svc_rqst *rqstp) update_thread_usage(atomic_read(&nfsd_busy)); atomic_dec(&nfsd_busy); } + /* Clear signals before calling lockd_down() and svc_exit_thread() */ + flush_signals(current); if (err != -EINTR) { printk(KERN_WARNING "nfsd: terminating on error %d\n", -err);