aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svc4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/svc4proc.c')
-rw-r--r--fs/lockd/svc4proc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
index 9a41fdc19511..4a43d253c045 100644
--- a/fs/lockd/svc4proc.c
+++ b/fs/lockd/svc4proc.c
@@ -11,6 +11,7 @@
11#include <linux/time.h> 11#include <linux/time.h>
12#include <linux/lockd/lockd.h> 12#include <linux/lockd/lockd.h>
13#include <linux/lockd/share.h> 13#include <linux/lockd/share.h>
14#include <linux/sunrpc/svc_xprt.h>
14 15
15#define NLMDBG_FACILITY NLMDBG_CLIENT 16#define NLMDBG_FACILITY NLMDBG_CLIENT
16 17
@@ -151,7 +152,7 @@ nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
151 resp->cookie = argp->cookie; 152 resp->cookie = argp->cookie;
152 153
153 /* Don't accept requests during grace period */ 154 /* Don't accept requests during grace period */
154 if (locks_in_grace()) { 155 if (locks_in_grace(SVC_NET(rqstp))) {
155 resp->status = nlm_lck_denied_grace_period; 156 resp->status = nlm_lck_denied_grace_period;
156 return rpc_success; 157 return rpc_success;
157 } 158 }
@@ -161,7 +162,7 @@ nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
161 return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success; 162 return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
162 163
163 /* Try to cancel request. */ 164 /* Try to cancel request. */
164 resp->status = nlmsvc_cancel_blocked(file, &argp->lock); 165 resp->status = nlmsvc_cancel_blocked(SVC_NET(rqstp), file, &argp->lock);
165 166
166 dprintk("lockd: CANCEL status %d\n", ntohl(resp->status)); 167 dprintk("lockd: CANCEL status %d\n", ntohl(resp->status));
167 nlmsvc_release_host(host); 168 nlmsvc_release_host(host);
@@ -184,7 +185,7 @@ nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
184 resp->cookie = argp->cookie; 185 resp->cookie = argp->cookie;
185 186
186 /* Don't accept new lock requests during grace period */ 187 /* Don't accept new lock requests during grace period */
187 if (locks_in_grace()) { 188 if (locks_in_grace(SVC_NET(rqstp))) {
188 resp->status = nlm_lck_denied_grace_period; 189 resp->status = nlm_lck_denied_grace_period;
189 return rpc_success; 190 return rpc_success;
190 } 191 }
@@ -194,7 +195,7 @@ nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
194 return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success; 195 return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
195 196
196 /* Now try to remove the lock */ 197 /* Now try to remove the lock */
197 resp->status = nlmsvc_unlock(file, &argp->lock); 198 resp->status = nlmsvc_unlock(SVC_NET(rqstp), file, &argp->lock);
198 199
199 dprintk("lockd: UNLOCK status %d\n", ntohl(resp->status)); 200 dprintk("lockd: UNLOCK status %d\n", ntohl(resp->status));
200 nlmsvc_release_host(host); 201 nlmsvc_release_host(host);
@@ -321,7 +322,7 @@ nlm4svc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
321 resp->cookie = argp->cookie; 322 resp->cookie = argp->cookie;
322 323
323 /* Don't accept new lock requests during grace period */ 324 /* Don't accept new lock requests during grace period */
324 if (locks_in_grace() && !argp->reclaim) { 325 if (locks_in_grace(SVC_NET(rqstp)) && !argp->reclaim) {
325 resp->status = nlm_lck_denied_grace_period; 326 resp->status = nlm_lck_denied_grace_period;
326 return rpc_success; 327 return rpc_success;
327 } 328 }
@@ -354,7 +355,7 @@ nlm4svc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
354 resp->cookie = argp->cookie; 355 resp->cookie = argp->cookie;
355 356
356 /* Don't accept requests during grace period */ 357 /* Don't accept requests during grace period */
357 if (locks_in_grace()) { 358 if (locks_in_grace(SVC_NET(rqstp))) {
358 resp->status = nlm_lck_denied_grace_period; 359 resp->status = nlm_lck_denied_grace_period;
359 return rpc_success; 360 return rpc_success;
360 } 361 }