aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svcproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/svcproc.c')
-rw-r--r--fs/lockd/svcproc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
index 76262c1986f2..1b013e198804 100644
--- a/fs/lockd/svcproc.c
+++ b/fs/lockd/svcproc.c
@@ -118,7 +118,7 @@ nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
118 resp->cookie = argp->cookie; 118 resp->cookie = argp->cookie;
119 119
120 /* Don't accept test requests during grace period */ 120 /* Don't accept test requests during grace period */
121 if (nlmsvc_grace_period) { 121 if (locks_in_grace()) {
122 resp->status = nlm_lck_denied_grace_period; 122 resp->status = nlm_lck_denied_grace_period;
123 return rc; 123 return rc;
124 } 124 }
@@ -153,7 +153,7 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
153 resp->cookie = argp->cookie; 153 resp->cookie = argp->cookie;
154 154
155 /* Don't accept new lock requests during grace period */ 155 /* Don't accept new lock requests during grace period */
156 if (nlmsvc_grace_period && !argp->reclaim) { 156 if (locks_in_grace() && !argp->reclaim) {
157 resp->status = nlm_lck_denied_grace_period; 157 resp->status = nlm_lck_denied_grace_period;
158 return rc; 158 return rc;
159 } 159 }
@@ -199,7 +199,7 @@ nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
199 resp->cookie = argp->cookie; 199 resp->cookie = argp->cookie;
200 200
201 /* Don't accept requests during grace period */ 201 /* Don't accept requests during grace period */
202 if (nlmsvc_grace_period) { 202 if (locks_in_grace()) {
203 resp->status = nlm_lck_denied_grace_period; 203 resp->status = nlm_lck_denied_grace_period;
204 return rpc_success; 204 return rpc_success;
205 } 205 }
@@ -232,7 +232,7 @@ nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
232 resp->cookie = argp->cookie; 232 resp->cookie = argp->cookie;
233 233
234 /* Don't accept new lock requests during grace period */ 234 /* Don't accept new lock requests during grace period */
235 if (nlmsvc_grace_period) { 235 if (locks_in_grace()) {
236 resp->status = nlm_lck_denied_grace_period; 236 resp->status = nlm_lck_denied_grace_period;
237 return rpc_success; 237 return rpc_success;
238 } 238 }
@@ -373,7 +373,7 @@ nlmsvc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
373 resp->cookie = argp->cookie; 373 resp->cookie = argp->cookie;
374 374
375 /* Don't accept new lock requests during grace period */ 375 /* Don't accept new lock requests during grace period */
376 if (nlmsvc_grace_period && !argp->reclaim) { 376 if (locks_in_grace() && !argp->reclaim) {
377 resp->status = nlm_lck_denied_grace_period; 377 resp->status = nlm_lck_denied_grace_period;
378 return rpc_success; 378 return rpc_success;
379 } 379 }
@@ -406,7 +406,7 @@ nlmsvc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
406 resp->cookie = argp->cookie; 406 resp->cookie = argp->cookie;
407 407
408 /* Don't accept requests during grace period */ 408 /* Don't accept requests during grace period */
409 if (nlmsvc_grace_period) { 409 if (locks_in_grace()) {
410 resp->status = nlm_lck_denied_grace_period; 410 resp->status = nlm_lck_denied_grace_period;
411 return rpc_success; 411 return rpc_success;
412 } 412 }