From bd04e537ce01ceec7324051480947f0126c0857f Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 11 Oct 2011 09:49:21 -0400 Subject: [PATCH] --- yaml --- r: 267206 b: refs/heads/master c: 3236c3e1adc0c7ec83eaff1de2d06746b7c5bb28 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfs/write.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 68030cb241e5..51ac79155acc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 59b7c05fffba030e5d9e72324691e2f99aa69b79 +refs/heads/master: 3236c3e1adc0c7ec83eaff1de2d06746b7c5bb28 diff --git a/trunk/fs/nfs/write.c b/trunk/fs/nfs/write.c index 71296cc97f98..46aa4389ce13 100644 --- a/trunk/fs/nfs/write.c +++ b/trunk/fs/nfs/write.c @@ -1554,6 +1554,10 @@ static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_contr int flags = FLUSH_SYNC; int ret = 0; + /* no commits means nothing needs to be done */ + if (!nfsi->ncommit) + return ret; + 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.