NFS: return -ENOKEY when the upcall fails to map the name

This allows the normal error-paths to handle the error, rather than
making a special call to complete_request_key() just for this instance.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Tested-by: William Dauchy <wdauchy@gmail.com>
Cc: stable@vger.kernel.org [>= 3.4]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Bryan Schumaker 2012-08-09 14:05:50 -04:00 committed by Trond Myklebust
parent c5066945b7
commit 12dfd08055

View file

@ -760,9 +760,8 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
} }
if (!(im.im_status & IDMAP_STATUS_SUCCESS)) { if (!(im.im_status & IDMAP_STATUS_SUCCESS)) {
ret = mlen; ret = -ENOKEY;
complete_request_key(cons, -ENOKEY); goto out;
goto out_incomplete;
} }
namelen_in = strnlen(im.im_name, IDMAP_NAMESZ); namelen_in = strnlen(im.im_name, IDMAP_NAMESZ);
@ -779,7 +778,6 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
out: out:
complete_request_key(cons, ret); complete_request_key(cons, ret);
out_incomplete:
return ret; return ret;
} }