patch-2.2.18 linux/fs/nfsd/lockd.c
Next file: linux/fs/nfsd/nfs3proc.c
Previous file: linux/fs/nfsd/export.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Sun Oct 15 21:15:17 2000
- Orig file:
v2.2.17/fs/nfsd/lockd.c
- Orig date:
Fri Apr 21 12:46:44 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/fs/nfsd/lockd.c linux/fs/nfsd/lockd.c
@@ -30,11 +30,21 @@
fh.fh_handle = *f;
fh.fh_export = NULL;
- nfserr = nfsd_open(rqstp, &fh, S_IFREG, 0, filp);
+ nfserr = nfsd_open(rqstp, &fh, S_IFREG, MAY_LOCK, filp);
if (!nfserr)
dget(filp->f_dentry);
fh_put(&fh);
- return nfserr;
+ /* nlm and nfsd don't share error codes.
+ * we invent: 0 = no error
+ * 1 = stale file handle
+ * 2 = other error
+ */
+ if (nfserr == 0)
+ return 0;
+ else if (nfserr == nfserr_stale)
+ return 1;
+ else return 2;
+
}
static void
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)