|
@@ -659,16 +659,19 @@ int nfs_async_inode_return_delegation(struct inode *inode,
|
|
|
|
|
|
rcu_read_lock();
|
|
|
delegation = rcu_dereference(NFS_I(inode)->delegation);
|
|
|
+ if (delegation == NULL)
|
|
|
+ goto out_enoent;
|
|
|
|
|
|
- if (!clp->cl_mvops->match_stateid(&delegation->stateid, stateid)) {
|
|
|
- rcu_read_unlock();
|
|
|
- return -ENOENT;
|
|
|
- }
|
|
|
+ if (!clp->cl_mvops->match_stateid(&delegation->stateid, stateid))
|
|
|
+ goto out_enoent;
|
|
|
nfs_mark_return_delegation(server, delegation);
|
|
|
rcu_read_unlock();
|
|
|
|
|
|
nfs_delegation_run_state_manager(clp);
|
|
|
return 0;
|
|
|
+out_enoent:
|
|
|
+ rcu_read_unlock();
|
|
|
+ return -ENOENT;
|
|
|
}
|
|
|
|
|
|
static struct inode *
|