提交 7fcd5330 编写于 作者: A Al Viro 提交者: 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: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册