aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/lockd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/lockd.c')
-rw-r--r--fs/nfsd/lockd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c
index 7b889ff15ae6..9b9e7e127c03 100644
--- a/fs/nfsd/lockd.c
+++ b/fs/nfsd/lockd.c
@@ -39,18 +39,20 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp)
39 fh_put(&fh); 39 fh_put(&fh);
40 rqstp->rq_client = NULL; 40 rqstp->rq_client = NULL;
41 exp_readunlock(); 41 exp_readunlock();
42 /* nlm and nfsd don't share error codes. 42 /* We return nlm error codes as nlm doesn't know
43 * we invent: 0 = no error 43 * about nfsd, but nfsd does know about nlm..
44 * 1 = stale file handle
45 * 2 = other error
46 */ 44 */
47 switch (nfserr) { 45 switch (nfserr) {
48 case nfs_ok: 46 case nfs_ok:
49 return 0; 47 return 0;
48 case nfserr_dropit:
49 return nlm_drop_reply;
50#ifdef CONFIG_LOCKD_V4
50 case nfserr_stale: 51 case nfserr_stale:
51 return 1; 52 return nlm4_stale_fh;
53#endif
52 default: 54 default:
53 return 2; 55 return nlm_lck_denied;
54 } 56 }
55} 57}
56 58