]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFS: return -ENOKEY when the upcall fails to map the name
authorBryan Schumaker <bjschuma@netapp.com>
Thu, 9 Aug 2012 18:05:50 +0000 (14:05 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2012 16:59:25 +0000 (09:59 -0700)
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>
fs/nfs/idmap.c

index bf184841f595ebb1c7a01e6f044c6d84a07061b9..a0972e9898f884a6d164ea87603032820be25097 100644 (file)
@@ -763,9 +763,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);
@@ -782,7 +781,6 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
 
 out:
        complete_request_key(cons, ret);
-out_incomplete:
        return ret;
 }