diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 1bb297243624313bf94e61cb8ac530b4a02068ba..ea8321923f284d7c9a4be2c56cba7a3a6831b885 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -87,8 +87,7 @@ __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy, res = 0; break; case -ENOENT: - if (res != 0) - res = htonl(NFS4ERR_BAD_STATEID); + res = htonl(NFS4ERR_BAD_STATEID); break; default: res = htonl(NFS4ERR_RESOURCE); @@ -325,10 +324,11 @@ int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, const n if (delegation == NULL) return 0; - if (stateid->stateid.seqid != 0) + if (stateid->stateid.seqid != 0 && + stateid->stateid.seqid != delegation->stateid.stateid.seqid) return 0; - if (memcmp(&delegation->stateid.stateid.other, - &stateid->stateid.other, + if (memcmp(delegation->stateid.stateid.other, + stateid->stateid.other, NFS4_STATEID_OTHER_SIZE)) return 0; diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index ac889af8ccf5c68188a9b685fcda272fc47b7a03..c14512cea798d75ddf8678fb5b3aa6d6099fc2a6 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -542,7 +542,7 @@ void nfs_expire_unreferenced_delegations(struct nfs_client *clp) /** * nfs_async_inode_return_delegation - asynchronously return a delegation * @inode: inode to process - * @stateid: state ID information from CB_RECALL arguments + * @stateid: state ID information * * Returns zero on success, or a negative errno value. */