Skip to content

Commit 12dfd08

Browse files
Bryan SchumakerTrond Myklebust
authored andcommitted
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 <[email protected]> Tested-by: William Dauchy <[email protected]> Cc: [email protected] [>= 3.4] Signed-off-by: Trond Myklebust <[email protected]>
1 parent c506694 commit 12dfd08

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/nfs/idmap.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,8 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
760760
}
761761

762762
if (!(im.im_status & IDMAP_STATUS_SUCCESS)) {
763-
ret = mlen;
764-
complete_request_key(cons, -ENOKEY);
765-
goto out_incomplete;
763+
ret = -ENOKEY;
764+
goto out;
766765
}
767766

768767
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)
779778

780779
out:
781780
complete_request_key(cons, ret);
782-
out_incomplete:
783781
return ret;
784782
}
785783

0 commit comments

Comments
 (0)