Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4383
b: refs/heads/master
c: 0dd395d
h: refs/heads/master
i:
  4381: 8483ba3
  4379: b48936e
  4375: d762f58
  4367: 9c1b490
  4351: fd5d229
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jul 8, 2005
1 parent b3e74fc commit 8b12ad7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b648330a1d741d5df8a5076b2a0a2519c69c8f41
refs/heads/master: 0dd395dc76071a06eea39839cc946c1241af3650
12 changes: 7 additions & 5 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2706,11 +2706,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
(long long) lock->lk_offset,
(long long) lock->lk_length);

if (nfs4_in_grace() && !lock->lk_reclaim)
return nfserr_grace;
if (!nfs4_in_grace() && lock->lk_reclaim)
return nfserr_no_grace;

if (check_lock_length(lock->lk_offset, lock->lk_length))
return nfserr_inval;

Expand Down Expand Up @@ -2785,6 +2780,13 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
goto out;
}

status = nfserr_grace;
if (nfs4_in_grace() && !lock->lk_reclaim)
goto out;
status = nfserr_no_grace;
if (!nfs4_in_grace() && lock->lk_reclaim)
goto out;

locks_init_lock(&file_lock);
switch (lock->lk_type) {
case NFS4_READ_LT:
Expand Down

0 comments on commit 8b12ad7

Please sign in to comment.