aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-01-18 20:43:48 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 22:20:28 -0500
commit7fcd53303de8dbbed863f6471ca92eb96a1faa28 (patch)
tree6a2b08da2310c5dc5b57b11558ecc09ebd6ecba7 /fs/nfsd
parentde1ae286f863c46b7c8f9bed97df17d7f5ea510c (diff)
[PATCH] nfsd4_lock() returns bogus values to clients
missing nfserrno() in default case of a switch by return value of posix_lock_file(); as the result we send negative host-endian to clients that expect positive network-endian, preferably mentioned in RFC... BTW, that case is not impossible - posix_lock_file() can return -ENOLCK and we do not handle that one explicitly. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 856ed4fd662b..1143cfb64549 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2761,7 +2761,10 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
2761 goto conflicting_lock; 2761 goto conflicting_lock;
2762 case (EDEADLK): 2762 case (EDEADLK):
2763 status = nfserr_deadlock; 2763 status = nfserr_deadlock;
2764 dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status);
2765 goto out;
2764 default: 2766 default:
2767 status = nfserrno(status);
2765 dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status); 2768 dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status);
2766 goto out; 2769 goto out;
2767 } 2770 }