Commit b04b22f4 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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

parent 369d6b7f
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -815,12 +815,14 @@ restart:
			inode = nfs_delegation_grab_inode(delegation);
			if (inode == NULL)
				continue;
			delegation = nfs_start_delegation_return_locked(NFS_I(inode));
			rcu_read_unlock();
			if (delegation != NULL) {
				delegation = nfs_detach_delegation(NFS_I(inode),
					delegation, server);
			rcu_read_unlock();

				if (delegation != NULL)
					nfs_free_delegation(delegation);
			}
			iput(inode);
			goto restart;
		}