summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfssvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r--fs/nfsd/nfssvc.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index ff1608a82..b7fa534e0 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -101,7 +101,7 @@ static void
nfsd(struct svc_rqst *rqstp)
{
struct svc_serv *serv = rqstp->rq_server;
- int oldumask, err;
+ int oldumask, err, first = 0;
/* Lock module and set up kernel thread */
MOD_INC_USE_COUNT;
@@ -115,8 +115,10 @@ nfsd(struct svc_rqst *rqstp)
oldumask = current->fs->umask; /* Set umask to 0. */
current->fs->umask = 0;
- if (!nfsd_active++)
+ if (!nfsd_active++) {
nfssvc_boot = xtime; /* record boot time */
+ first = 1;
+ }
lockd_up(); /* start lockd */
/*
@@ -133,8 +135,14 @@ nfsd(struct svc_rqst *rqstp)
* Find a socket with data available and call its
* recvfrom routine.
*/
- while ((err = svc_recv(serv, rqstp, MAX_SCHEDULE_TIMEOUT)) == -EAGAIN)
- ;
+ while ((err = svc_recv(serv, rqstp,
+ first?5*HZ:MAX_SCHEDULE_TIMEOUT)) == -EAGAIN) {
+ if (first && 1) {
+ exp_readlock();
+ expire_all();
+ exp_unlock();
+ }
+ }
if (err < 0)
break;