Skip to content

Commit

Permalink
NFS: return -ENOKEY when the upcall fails to map the name
Browse files Browse the repository at this point in the history
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>
Cc: stable@vger.kernel.org [>= 3.4]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Bryan Schumaker authored and Trond Myklebust committed Aug 16, 2012
1 parent c506694 commit 12dfd08
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/nfs/idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down

0 comments on commit 12dfd08

Please sign in to comment.