diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2009-02-09 18:30:43 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-03-18 22:30:50 +0100 |
commit | e33d1ea60c3a17b8b5c2910b1eef4c1faf0ac450 (patch) | |
tree | bbf0b7e86ac3860df9c1906711ad379bcc5681ed /fs/lockd/svclock.c | |
parent | nfsd: lock state around put client and delegation in nfsd4_cb_recall (diff) | |
download | linux-e33d1ea60c3a17b8b5c2910b1eef4c1faf0ac450.tar.xz linux-e33d1ea60c3a17b8b5c2910b1eef4c1faf0ac450.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | fs/lockd/svclock.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 763b78a6e9de..83ee34203bd7 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -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) + break; ret = nlm_lck_denied; - break; + goto out; case FILE_LOCK_DEFERRED: if (wait) break; @@ -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 */ |