aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4state.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 568d5deacac0..92968c94c6e6 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2706,11 +2706,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
2706 (long long) lock->lk_offset, 2706 (long long) lock->lk_offset,
2707 (long long) lock->lk_length); 2707 (long long) lock->lk_length);
2708 2708
2709 if (nfs4_in_grace() && !lock->lk_reclaim)
2710 return nfserr_grace;
2711 if (!nfs4_in_grace() && lock->lk_reclaim)
2712 return nfserr_no_grace;
2713
2714 if (check_lock_length(lock->lk_offset, lock->lk_length)) 2709 if (check_lock_length(lock->lk_offset, lock->lk_length))
2715 return nfserr_inval; 2710 return nfserr_inval;
2716 2711
@@ -2785,6 +2780,13 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
2785 goto out; 2780 goto out;
2786 } 2781 }
2787 2782
2783 status = nfserr_grace;
2784 if (nfs4_in_grace() && !lock->lk_reclaim)
2785 goto out;
2786 status = nfserr_no_grace;
2787 if (!nfs4_in_grace() && lock->lk_reclaim)
2788 goto out;
2789
2788 locks_init_lock(&file_lock); 2790 locks_init_lock(&file_lock);
2789 switch (lock->lk_type) { 2791 switch (lock->lk_type) {
2790 case NFS4_READ_LT: 2792 case NFS4_READ_LT: