Commit f9e0cc9c authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent b47e0e47
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment