Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308592
b: refs/heads/master
c: dc327ed
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 8, 2012
1 parent 7e5f466 commit b8dd08e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c57d1bc5e043dbb5ba82ded07003d71a8033d899
refs/heads/master: dc327ed4cd320be689596365372a3683208c3ba0
10 changes: 7 additions & 3 deletions trunk/fs/nfs/delegation.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ static int __nfs_inode_return_delegation(struct inode *inode, struct nfs_delegat
* nfs_client_return_marked_delegations - return previously marked delegations
* @clp: nfs_client to process
*
* Note that this function is designed to be called by the state
* manager thread. For this reason, it cannot flush the dirty data,
* since that could deadlock in case of a state recovery error.
*
* Returns zero on success, or a negative errno value.
*/
int nfs_client_return_marked_delegations(struct nfs_client *clp)
Expand All @@ -340,11 +344,9 @@ int nfs_client_return_marked_delegations(struct nfs_client *clp)
server);
rcu_read_unlock();

if (delegation != NULL) {
filemap_flush(inode->i_mapping);
if (delegation != NULL)
err = __nfs_inode_return_delegation(inode,
delegation, 0);
}
iput(inode);
if (!err)
goto restart;
Expand Down Expand Up @@ -542,6 +544,8 @@ 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);

Expand Down

0 comments on commit b8dd08e

Please sign in to comment.