Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12dfd080 authored by Bryan Schumaker's avatar Bryan Schumaker Committed by Trond Myklebust
Browse files

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: default avatarBryan Schumaker <bjschuma@netapp.com>
Tested-by: default avatarWilliam Dauchy <wdauchy@gmail.com>
Cc: stable@vger.kernel.org [>= 3.4]
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent c5066945
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -760,9 +760,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);
@@ -779,7 +778,6 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)

out:
	complete_request_key(cons, ret);
out_incomplete:
	return ret;
}