From: Al Viro 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 Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- fs/nfsd/nfs4state.c | 3 +++ 1 files changed, 3 insertions(+) diff -puN fs/nfsd/nfs4state.c~nfsd4_lock-returns-bogus-values-to-clients fs/nfsd/nfs4state.c --- 25/fs/nfsd/nfs4state.c~nfsd4_lock-returns-bogus-values-to-clients Fri Jan 13 17:54:25 2006 +++ 25-akpm/fs/nfsd/nfs4state.c Fri Jan 13 17:54:25 2006 @@ -2762,7 +2762,10 @@ nfsd4_lock(struct svc_rqst *rqstp, struc goto conflicting_lock; case (EDEADLK): status = nfserr_deadlock; + dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status); + goto out; default: + status = nfserrno(status); dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status); goto out; } _