git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
nfsd
/
lockd.c
diff --git
a/fs/nfsd/lockd.c
b/fs/nfsd/lockd.c
index
7b889ff
..
221acd1
100644
(file)
--- a/
fs/nfsd/lockd.c
+++ b/
fs/nfsd/lockd.c
@@
-22,10
+22,10
@@
/*
* Note: we hold the dentry use count while the file is open.
*/
/*
* Note: we hold the dentry use count while the file is open.
*/
-static
u
32
+static
__be
32
nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp)
{
nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp)
{
-
u32
nfserr;
+
__be32
nfserr;
struct svc_fh fh;
/* must initialize before using! but maxsize doesn't matter */
struct svc_fh fh;
/* must initialize before using! but maxsize doesn't matter */
@@
-39,18
+39,20
@@
nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp)
fh_put(&fh);
rqstp->rq_client = NULL;
exp_readunlock();
fh_put(&fh);
rqstp->rq_client = NULL;
exp_readunlock();
- /* nlm and nfsd don't share error codes.
- * we invent: 0 = no error
- * 1 = stale file handle
- * 2 = other error
+ /* We return nlm error codes as nlm doesn't know
+ * about nfsd, but nfsd does know about nlm..
*/
switch (nfserr) {
case nfs_ok:
return 0;
*/
switch (nfserr) {
case nfs_ok:
return 0;
+ case nfserr_dropit:
+ return nlm_drop_reply;
+#ifdef CONFIG_LOCKD_V4
case nfserr_stale:
case nfserr_stale:
- return 1;
+ return nlm4_stale_fh;
+#endif
default:
default:
- return
2
;
+ return
nlm_lck_denied
;
}
}
}
}