|
@@ -721,14 +721,12 @@ int nfs_async_inode_return_delegation(struct inode *inode,
|
|
|
struct nfs_client *clp = server->nfs_client;
|
|
|
struct nfs_delegation *delegation;
|
|
|
|
|
|
- filemap_flush(inode->i_mapping);
|
|
|
-
|
|
|
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))
|
|
|
+ if (stateid != NULL &&
|
|
|
+ !clp->cl_mvops->match_stateid(&delegation->stateid, stateid))
|
|
|
goto out_enoent;
|
|
|
nfs_mark_return_delegation(server, delegation);
|
|
|
rcu_read_unlock();
|