From: Trond Myklebust Date: Mon, 21 Oct 2019 18:12:13 +0000 (-0400) Subject: NFSv4: Don't remove the delegation from the super_list more than once X-Git-Tag: v5.10.7~3675^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9e0cc9c97906ede17ca5cd56a7b170830f4369a;p=platform%2Fkernel%2Flinux-rpi.git NFSv4: Don't remove the delegation from the super_list more than once Add a check to ensure that we haven't already removed the delegation from the inode after we take all the relevant locks. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 0c9339d..e80419a6 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -298,6 +298,10 @@ nfs_detach_delegation_locked(struct nfs_inode *nfsi, return NULL; spin_lock(&delegation->lock); + if (!delegation->inode) { + spin_unlock(&delegation->lock); + return NULL; + } set_bit(NFS_DELEGATION_RETURNING, &delegation->flags); list_del_rcu(&delegation->super_list); delegation->inode = NULL;