Commit b04b22f4 authored by Trond Myklebust's avatar Trond Myklebust

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

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 369d6b7f
...@@ -815,12 +815,14 @@ void nfs_delegation_reap_unclaimed(struct nfs_client *clp) ...@@ -815,12 +815,14 @@ void nfs_delegation_reap_unclaimed(struct nfs_client *clp)
inode = nfs_delegation_grab_inode(delegation); inode = nfs_delegation_grab_inode(delegation);
if (inode == NULL) if (inode == NULL)
continue; continue;
delegation = nfs_detach_delegation(NFS_I(inode), delegation = nfs_start_delegation_return_locked(NFS_I(inode));
delegation, server);
rcu_read_unlock(); rcu_read_unlock();
if (delegation != NULL) {
if (delegation != NULL) delegation = nfs_detach_delegation(NFS_I(inode),
nfs_free_delegation(delegation); delegation, server);
if (delegation != NULL)
nfs_free_delegation(delegation);
}
iput(inode); iput(inode);
goto restart; goto restart;
} }
......
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