Commit d3078898 authored by Bryan Schumaker's avatar Bryan Schumaker Committed by Greg Kroah-Hartman

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

commit 12dfd080 upstream.

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: default avatarBryan Schumaker <bjschuma@netapp.com>
Tested-by: default avatarWilliam Dauchy <wdauchy@gmail.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 797d03b9
......@@ -747,9 +747,8 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
}
if (!(im.im_status & IDMAP_STATUS_SUCCESS)) {
ret = mlen;
complete_request_key(cons, -ENOKEY);
goto out_incomplete;
ret = -ENOKEY;
goto out;
}
namelen_in = strnlen(im.im_name, IDMAP_NAMESZ);
......@@ -766,7 +765,6 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
out:
complete_request_key(cons, ret);
out_incomplete:
return ret;
}
......
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