Commit e33d1ea6 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by J. Bruce Fields

lockd: clean up blocking lock cases of nlsmvc_lock()

No change in behavior, just rearranging the switch so that we break out
of the switch if and only if we're in the wait case.
Signed-off-by: default avatarMiklos Szeredi <>
Signed-off-by: default avatarJ. Bruce Fields <>
parent e37da04e
......@@ -426,8 +426,15 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
ret = nlm_granted;
goto out;
case -EAGAIN:
* If this is a blocking request for an
* already pending lock request then we need
* to put it back on lockd's block list
if (wait)
ret = nlm_lck_denied;
goto out;
if (wait)
......@@ -443,10 +450,6 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
goto out;
ret = nlm_lck_denied;
if (!wait)
goto out;
ret = nlm_lck_blocked;
/* Append to list of blocked */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment