aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-29 16:38:36 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-07-05 13:13:18 -0400
commit42a2d13eee3c895d22e9d1a52b96d15ca49adabc (patch)
tree42e2195fa5ee1ed867418aedf42ee17624553c5f /fs/nfs/nfs4proc.c
parent9b07357490e5c7a1c3c2b6f4679d7ee4b4185ecd (diff)
NFSv4: Ensure nfs4_lock_expired() caches delegated locks
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b8c63757f039..8bdfe3ff7925 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3454,10 +3454,10 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request
3454 struct nfs4_exception exception = { }; 3454 struct nfs4_exception exception = { };
3455 int err; 3455 int err;
3456 3456
3457 /* Cache the lock if possible... */
3458 if (test_bit(NFS_DELEGATED_STATE, &state->flags))
3459 return 0;
3460 do { 3457 do {
3458 /* Cache the lock if possible... */
3459 if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0)
3460 return 0;
3461 err = _nfs4_do_setlk(state, F_SETLK, request, 1); 3461 err = _nfs4_do_setlk(state, F_SETLK, request, 1);
3462 if (err != -NFS4ERR_DELAY) 3462 if (err != -NFS4ERR_DELAY)
3463 break; 3463 break;
@@ -3476,6 +3476,8 @@ static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request
3476 if (err != 0) 3476 if (err != 0)
3477 return err; 3477 return err;
3478 do { 3478 do {
3479 if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0)
3480 return 0;
3479 err = _nfs4_do_setlk(state, F_SETLK, request, 0); 3481 err = _nfs4_do_setlk(state, F_SETLK, request, 0);
3480 if (err != -NFS4ERR_DELAY) 3482 if (err != -NFS4ERR_DELAY)
3481 break; 3483 break;