aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/nfs4proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 21482b2518f6..60e0dd800cc3 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3071,15 +3071,15 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock
3071 struct nfs4_client *clp = state->owner->so_client; 3071 struct nfs4_client *clp = state->owner->so_client;
3072 int status; 3072 int status;
3073 3073
3074 down_read(&clp->cl_sem);
3075 /* Is this a delegated open? */ 3074 /* Is this a delegated open? */
3076 if (test_bit(NFS_DELEGATED_STATE, &state->flags)) { 3075 if (NFS_I(state->inode)->delegation_state != 0) {
3077 /* Yes: cache locks! */ 3076 /* Yes: cache locks! */
3078 status = do_vfs_lock(request->fl_file, request); 3077 status = do_vfs_lock(request->fl_file, request);
3079 /* ...but avoid races with delegation recall... */ 3078 /* ...but avoid races with delegation recall... */
3080 if (status < 0 || test_bit(NFS_DELEGATED_STATE, &state->flags)) 3079 if (status < 0 || test_bit(NFS_DELEGATED_STATE, &state->flags))
3081 goto out; 3080 return status;
3082 } 3081 }
3082 down_read(&clp->cl_sem);
3083 status = nfs4_set_lock_state(state, request); 3083 status = nfs4_set_lock_state(state, request);
3084 if (status != 0) 3084 if (status != 0)
3085 goto out; 3085 goto out;