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: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
e37da04ed1
commit
e33d1ea60c
|
@ -426,8 +426,15 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
|
||||||
ret = nlm_granted;
|
ret = nlm_granted;
|
||||||
goto out;
|
goto out;
|
||||||
case -EAGAIN:
|
case -EAGAIN:
|
||||||
ret = nlm_lck_denied;
|
/*
|
||||||
|
* 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)
|
||||||
break;
|
break;
|
||||||
|
ret = nlm_lck_denied;
|
||||||
|
goto out;
|
||||||
case FILE_LOCK_DEFERRED:
|
case FILE_LOCK_DEFERRED:
|
||||||
if (wait)
|
if (wait)
|
||||||
break;
|
break;
|
||||||
|
@ -443,10 +450,6 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = nlm_lck_denied;
|
|
||||||
if (!wait)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
ret = nlm_lck_blocked;
|
ret = nlm_lck_blocked;
|
||||||
|
|
||||||
/* Append to list of blocked */
|
/* Append to list of blocked */
|
||||||
|
|
Reference in New Issue