提交 b04b22f4 编写于 作者: T Trond Myklebust

NFSv4: Ensure that we don't reap a delegation that is being returned

Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 369d6b7f
......@@ -815,12 +815,14 @@ void nfs_delegation_reap_unclaimed(struct nfs_client *clp)
inode = nfs_delegation_grab_inode(delegation);
if (inode == NULL)
continue;
delegation = nfs_detach_delegation(NFS_I(inode),
delegation, server);
delegation = nfs_start_delegation_return_locked(NFS_I(inode));
rcu_read_unlock();
if (delegation != NULL)
nfs_free_delegation(delegation);
if (delegation != NULL) {
delegation = nfs_detach_delegation(NFS_I(inode),
delegation, server);
if (delegation != NULL)
nfs_free_delegation(delegation);
}
iput(inode);
goto restart;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册