diff options
Diffstat (limited to 'fs/lockd/svclock.c')
-rw-r--r-- | fs/lockd/svclock.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index e46353f41a42..afe4488c33d8 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/sunrpc/clnt.h> | 28 | #include <linux/sunrpc/clnt.h> |
29 | #include <linux/sunrpc/svc.h> | 29 | #include <linux/sunrpc/svc_xprt.h> |
30 | #include <linux/lockd/nlm.h> | 30 | #include <linux/lockd/nlm.h> |
31 | #include <linux/lockd/lockd.h> | 31 | #include <linux/lockd/lockd.h> |
32 | #include <linux/kthread.h> | 32 | #include <linux/kthread.h> |
@@ -447,11 +447,11 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file, | |||
447 | goto out; | 447 | goto out; |
448 | } | 448 | } |
449 | 449 | ||
450 | if (locks_in_grace() && !reclaim) { | 450 | if (locks_in_grace(SVC_NET(rqstp)) && !reclaim) { |
451 | ret = nlm_lck_denied_grace_period; | 451 | ret = nlm_lck_denied_grace_period; |
452 | goto out; | 452 | goto out; |
453 | } | 453 | } |
454 | if (reclaim && !locks_in_grace()) { | 454 | if (reclaim && !locks_in_grace(SVC_NET(rqstp))) { |
455 | ret = nlm_lck_denied_grace_period; | 455 | ret = nlm_lck_denied_grace_period; |
456 | goto out; | 456 | goto out; |
457 | } | 457 | } |
@@ -559,7 +559,7 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file, | |||
559 | goto out; | 559 | goto out; |
560 | } | 560 | } |
561 | 561 | ||
562 | if (locks_in_grace()) { | 562 | if (locks_in_grace(SVC_NET(rqstp))) { |
563 | ret = nlm_lck_denied_grace_period; | 563 | ret = nlm_lck_denied_grace_period; |
564 | goto out; | 564 | goto out; |
565 | } | 565 | } |
@@ -603,7 +603,7 @@ out: | |||
603 | * must be removed. | 603 | * must be removed. |
604 | */ | 604 | */ |
605 | __be32 | 605 | __be32 |
606 | nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock) | 606 | nlmsvc_unlock(struct net *net, struct nlm_file *file, struct nlm_lock *lock) |
607 | { | 607 | { |
608 | int error; | 608 | int error; |
609 | 609 | ||
@@ -615,7 +615,7 @@ nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock) | |||
615 | (long long)lock->fl.fl_end); | 615 | (long long)lock->fl.fl_end); |
616 | 616 | ||
617 | /* First, cancel any lock that might be there */ | 617 | /* First, cancel any lock that might be there */ |
618 | nlmsvc_cancel_blocked(file, lock); | 618 | nlmsvc_cancel_blocked(net, file, lock); |
619 | 619 | ||
620 | lock->fl.fl_type = F_UNLCK; | 620 | lock->fl.fl_type = F_UNLCK; |
621 | error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL); | 621 | error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL); |
@@ -631,7 +631,7 @@ nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock) | |||
631 | * The calling procedure must check whether the file can be closed. | 631 | * The calling procedure must check whether the file can be closed. |
632 | */ | 632 | */ |
633 | __be32 | 633 | __be32 |
634 | nlmsvc_cancel_blocked(struct nlm_file *file, struct nlm_lock *lock) | 634 | nlmsvc_cancel_blocked(struct net *net, struct nlm_file *file, struct nlm_lock *lock) |
635 | { | 635 | { |
636 | struct nlm_block *block; | 636 | struct nlm_block *block; |
637 | int status = 0; | 637 | int status = 0; |
@@ -643,7 +643,7 @@ nlmsvc_cancel_blocked(struct nlm_file *file, struct nlm_lock *lock) | |||
643 | (long long)lock->fl.fl_start, | 643 | (long long)lock->fl.fl_start, |
644 | (long long)lock->fl.fl_end); | 644 | (long long)lock->fl.fl_end); |
645 | 645 | ||
646 | if (locks_in_grace()) | 646 | if (locks_in_grace(net)) |
647 | return nlm_lck_denied_grace_period; | 647 | return nlm_lck_denied_grace_period; |
648 | 648 | ||
649 | mutex_lock(&file->f_mutex); | 649 | mutex_lock(&file->f_mutex); |