patch-2.1.81 linux/fs/nfsd/nfssvc.c
Next file: linux/fs/ntfs/fs.c
Previous file: linux/fs/nfsd/nfsfh.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Fri Jan 23 16:35:35 1998
- Orig file:
v2.1.80/linux/fs/nfsd/nfssvc.c
- Orig date:
Fri Dec 19 10:54:10 1997
diff -u --recursive --new-file v2.1.80/linux/fs/nfsd/nfssvc.c linux/fs/nfsd/nfssvc.c
@@ -42,6 +42,7 @@
extern struct svc_program nfsd_program;
static void nfsd(struct svc_rqst *rqstp);
struct timeval nfssvc_boot = { 0, 0 };
+static int nfsd_active = 0;
int
nfsd_svc(unsigned short port, int nrservs)
@@ -97,6 +98,7 @@
oldumask = current->fs->umask; /* Set umask to 0. */
current->fs->umask = 0;
nfssvc_boot = xtime; /* record boot time */
+ nfsd_active++;
lockd_up(); /* start lockd */
/*
@@ -160,6 +162,11 @@
/* Release lockd */
lockd_down();
+ if (!--nfsd_active) {
+ printk("nfsd: last server exiting\n");
+ /* revoke all exports */
+ nfsd_export_shutdown();
+ }
/* Destroy the thread */
svc_exit_thread(rqstp);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov