Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217058
b: refs/heads/master
c: a00dd6c
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Trond Myklebust committed Sep 29, 2010
1 parent 6caa630 commit 3084e25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: 5c78f58e2d5cef65c255a556184f1f43c8d84c84
refs/heads/master: a00dd6c03dd97a777c291a8af8682be4b5fadf8d
16 changes: 9 additions & 7 deletions trunk/fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,15 +1431,17 @@ static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_contr
int flags = FLUSH_SYNC;
int ret = 0;

/* Don't commit yet if this is a non-blocking flush and there are
* lots of outstanding writes for this mapping.
*/
if (wbc->sync_mode == WB_SYNC_NONE &&
nfsi->ncommit <= (nfsi->npages >> 1))
goto out_mark_dirty;
if (wbc->sync_mode == WB_SYNC_NONE) {
/* Don't commit yet if this is a non-blocking flush and there
* are a lot of outstanding writes for this mapping.
*/
if (nfsi->ncommit <= (nfsi->npages >> 1))
goto out_mark_dirty;

if (wbc->nonblocking || wbc->for_background)
/* don't wait for the COMMIT response */
flags = 0;
}

ret = nfs_commit_inode(inode, flags);
if (ret >= 0) {
if (wbc->sync_mode == WB_SYNC_NONE) {
Expand Down

0 comments on commit 3084e25

Please sign in to comment.