From: NeilBrown Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- fs/nfsd/nfsctl.c | 2 ++ 1 files changed, 2 insertions(+) diff -puN fs/nfsd/nfsctl.c~knfsd-protect-update-to-sn_nrthreads-with-lock_kernel fs/nfsd/nfsctl.c --- a/fs/nfsd/nfsctl.c~knfsd-protect-update-to-sn_nrthreads-with-lock_kernel +++ a/fs/nfsd/nfsctl.c @@ -532,7 +532,9 @@ static ssize_t write_ports(struct file * /* Decrease the count, but don't shutdown the * the service */ + lock_kernel(); nfsd_serv->sv_nrthreads--; + unlock_kernel(); } return err; } _