mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:20:53 +07:00
NFSv4: Update the stateid seqid in nfs_revoke_delegation()
If we revoke a delegation, but the stateid's seqid is newer, then ensure we update the seqid when marking the delegation as revoked. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
ae084a32ee
commit
f2d47b5502
@ -771,8 +771,19 @@ static bool nfs_revoke_delegation(struct inode *inode,
|
||||
if (stateid == NULL) {
|
||||
nfs4_stateid_copy(&tmp, &delegation->stateid);
|
||||
stateid = &tmp;
|
||||
} else if (!nfs4_stateid_match(stateid, &delegation->stateid))
|
||||
goto out;
|
||||
} else {
|
||||
if (!nfs4_stateid_match_other(stateid, &delegation->stateid))
|
||||
goto out;
|
||||
spin_lock(&delegation->lock);
|
||||
if (stateid->seqid) {
|
||||
if (nfs4_stateid_is_newer(&delegation->stateid, stateid)) {
|
||||
spin_unlock(&delegation->lock);
|
||||
goto out;
|
||||
}
|
||||
delegation->stateid.seqid = stateid->seqid;
|
||||
}
|
||||
spin_unlock(&delegation->lock);
|
||||
}
|
||||
nfs_mark_delegation_revoked(NFS_SERVER(inode), delegation);
|
||||
ret = true;
|
||||
out:
|
||||
|
Loading…
Reference in New Issue
Block a user