Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198883
b: refs/heads/master
c: c5efa5f
h: refs/heads/master
i:
  198881: ac98d89
  198879: 813f197
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 26, 2010
1 parent 4753d67 commit ace133d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 59844a9bd73e084b0ffefc0e13226098e28c71ad
refs/heads/master: c5efa5fc91f1f6d1d47e65f39e7ec6d1157c777d
13 changes: 11 additions & 2 deletions trunk/fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ static int nfs_commit_inode(struct inode *inode, int how)
int res = 0;

if (!nfs_commit_set_lock(NFS_I(inode), may_wait))
goto out;
goto out_mark_dirty;
spin_lock(&inode->i_lock);
res = nfs_scan_commit(inode, &head, 0, 0);
spin_unlock(&inode->i_lock);
Expand All @@ -1398,9 +1398,18 @@ static int nfs_commit_inode(struct inode *inode, int how)
wait_on_bit(&NFS_I(inode)->flags, NFS_INO_COMMIT,
nfs_wait_bit_killable,
TASK_KILLABLE);
else
goto out_mark_dirty;
} else
nfs_commit_clear_lock(NFS_I(inode));
out:
return res;
/* Note: If we exit without ensuring that the commit is complete,
* we must mark the inode as dirty. Otherwise, future calls to
* sync_inode() with the WB_SYNC_ALL flag set will fail to ensure
* that the data is on the disk.
*/
out_mark_dirty:
__mark_inode_dirty(inode, I_DIRTY_DATASYNC);
return res;
}

Expand Down

0 comments on commit ace133d

Please sign in to comment.