summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-08-09 14:05:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-14 10:00:16 -0700
commitd3078898b6f08028ee5ab8f6e8d12216d7f707ee (patch)
treede2d47ea2ff2dedc1b142c887ccdcb0c5f7103da /fs
parent797d03b980a559cd3312f7df3b41bb265cddcd8b (diff)
downloadlinux-stable-d3078898b6f08028ee5ab8f6e8d12216d7f707ee.tar.gz
linux-stable-d3078898b6f08028ee5ab8f6e8d12216d7f707ee.tar.bz2
linux-stable-d3078898b6f08028ee5ab8f6e8d12216d7f707ee.zip
NFS: return -ENOKEY when the upcall fails to map the name
commit 12dfd080556124088ed61a292184947711b46cbe 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: Bryan Schumaker <bjschuma@netapp.com> Tested-by: William Dauchy <wdauchy@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/idmap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 98d664349f7e..9131b17f3a72 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -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;
}