From: Trond Myklebust Date: Mon, 21 Oct 2019 18:11:00 +0000 (-0400) Subject: NFSv4: Hold the delegation spinlock when updating the seqid X-Git-Tag: v5.10.7~3675^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0f07896affd27ec378857dd6fccad0a43e52d35;p=platform%2Fkernel%2Flinux-rpi.git NFSv4: Hold the delegation spinlock when updating the seqid Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index e80419a6..7ebeb57 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -387,8 +387,10 @@ int nfs_inode_set_delegation(struct inode *inode, const struct cred *cred, /* Is this an update of the existing delegation? */ if (nfs4_stateid_match_other(&old_delegation->stateid, &delegation->stateid)) { + spin_lock(&old_delegation->lock); nfs_update_inplace_delegation(old_delegation, delegation); + spin_unlock(&old_delegation->lock); goto out; } /*