If the delegation is marked as being revoked, then don't use it in
the open state structure.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
                ret = 1;
        }
 
-       deleg_cur = rcu_dereference(nfsi->delegation);
+       deleg_cur = nfs4_get_valid_delegation(state->inode);
        if (deleg_cur == NULL)
                goto no_delegation;
 
 
        if (delegation == NULL)
                delegation = &deleg_cur->stateid;
-       else if (!nfs4_stateid_match(&deleg_cur->stateid, delegation))
+       else if (!nfs4_stateid_match_other(&deleg_cur->stateid, delegation))
                goto no_delegation_unlock;
 
        nfs_mark_delegation_referenced(deleg_cur);