aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfssvc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-06-10 08:40:36 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-06-23 13:02:49 -0400
commit3dd98a3bccb1bdd30b8a4a755e7bead1b64160ec (patch)
tree53b124bc44b33330102ef73f170fa91e785633bc /fs/nfsd/nfssvc.c
parentbedbdd8bada194a690d2901801bf8451965086b3 (diff)
knfsd: clean up nfsd filesystem interfaces
Several of the nfsd filesystem interfaces allow changes to parameters that don't have any effect on a running nfsd service. They are only ever checked when nfsd is started. This patch fixes it so that changes to those procfiles return -EBUSY if nfsd is already running to make it clear that changes on the fly don't work. The patch should also close some relatively harmless races between changing the info in those interfaces and starting nfsd, since these variables are being moved under the protection of the nfsd_mutex. Finally, the nfsv4recoverydir file always returns -EINVAL if read. This patch fixes it to return the recoverydir path as expected. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r--fs/nfsd/nfssvc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 512bd04c6dda..929af233510e 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -70,6 +70,14 @@ static DEFINE_SPINLOCK(nfsd_call_lock);
70 * Transitions of the thread count between zero and non-zero are of particular 70 * Transitions of the thread count between zero and non-zero are of particular
71 * interest since the svc_serv needs to be created and initialized at that 71 * interest since the svc_serv needs to be created and initialized at that
72 * point, or freed. 72 * point, or freed.
73 *
74 * Finally, the nfsd_mutex also protects some of the global variables that are
75 * accessed when nfsd starts and that are settable via the write_* routines in
76 * nfsctl.c. In particular:
77 *
78 * user_recovery_dirname
79 * user_lease_time
80 * nfsd_versions
73 */ 81 */
74DEFINE_MUTEX(nfsd_mutex); 82DEFINE_MUTEX(nfsd_mutex);
75struct svc_serv *nfsd_serv; 83struct svc_serv *nfsd_serv;