aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/write.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 07e9e79b8b4..6015c7a879b 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1526,6 +1526,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.