diff options
author | NeilBrown <neilb@suse.de> | 2006-10-04 11:15:44 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 16:55:15 +0200 |
commit | cda9e0cd8a6b30ccc32edced066c378fbd87003d (patch) | |
tree | a91bd1c12b1ddf355142f5a31c0caf487e0dffc8 | |
parent | [PATCH] knfsd: call lockd_down when closing a socket via a write to nfsd/port... (diff) | |
download | linux-cda9e0cd8a6b30ccc32edced066c378fbd87003d.tar.xz linux-cda9e0cd8a6b30ccc32edced066c378fbd87003d.zip |
[PATCH] knfsd: Protect update to sn_nrthreads with lock_kernel
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/nfsd/nfsctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 83997282fc1a..f85472dda463 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -532,7 +532,9 @@ static ssize_t write_ports(struct file *file, char *buf, size_t size) /* Decrease the count, but don't shutdown the * the service */ + lock_kernel(); nfsd_serv->sv_nrthreads--; + unlock_kernel(); } return err; } |