Commit 7fcd5330 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent de1ae286
......@@ -2761,7 +2761,10 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment