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>
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 98d6643..9131b17 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -747,9 +747,8 @@
}
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 @@
out:
complete_request_key(cons, ret);
-out_incomplete:
return ret;
}