[PATCH 004 of 11] knfsd: Protect update to sn_nrthreads with lock_kernel

NeilBrown
2006-08-24T06:37:04Z

./fs/nfsd/nfsctl.c | 2 ++
1 file changed, 2 insertions(+)

diff .prev/fs/nfsd/nfsctl.c ./fs/nfsd/nfsctl.c
--- .prev/fs/nfsd/nfsctl.c 2006-08-24 16:24:21.000000000 +1000
+++ ./fs/nfsd/nfsctl.c 2006-08-24 16:24:47.000000000 +1000
@@ -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;
}