diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-08-09 14:05:50 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-08-16 17:20:06 -0400 |
commit | 12dfd080556124088ed61a292184947711b46cbe (patch) | |
tree | cd446eee09b159e32784fa2e8f421b6ac8a3f655 /fs/nfs/idmap.c | |
parent | c5066945b7ea346a11424dbeb7830b7d7d00c206 (diff) |
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>
Diffstat (limited to 'fs/nfs/idmap.c')
-rw-r--r-- | fs/nfs/idmap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 6703c73307a5..a850079467d8 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -760,9 +760,8 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) | |||
760 | } | 760 | } |
761 | 761 | ||
762 | if (!(im.im_status & IDMAP_STATUS_SUCCESS)) { | 762 | if (!(im.im_status & IDMAP_STATUS_SUCCESS)) { |
763 | ret = mlen; | 763 | ret = -ENOKEY; |
764 | complete_request_key(cons, -ENOKEY); | 764 | goto out; |
765 | goto out_incomplete; | ||
766 | } | 765 | } |
767 | 766 | ||
768 | namelen_in = strnlen(im.im_name, IDMAP_NAMESZ); | 767 | 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) | |||
779 | 778 | ||
780 | out: | 779 | out: |
781 | complete_request_key(cons, ret); | 780 | complete_request_key(cons, ret); |
782 | out_incomplete: | ||
783 | return ret; | 781 | return ret; |
784 | } | 782 | } |
785 | 783 | ||