[PATCH 5/5] NFS: Run COMMIT as an asynchronous RPC call when wbc->for_background is set

Trond Myklebust
2010-01-07T14:44:41Z

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
---

fs/nfs/write.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 43e47b4..7f1f2aa 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1423,7 +1423,7 @@ int nfs_commit_unstable_pages(struct address_space *mapping,
mark_inode_unstable_pages(inode);
return 0;
}
- if (wbc->nonblocking)
+ if (wbc->nonblocking || wbc->for_background)
flags = 0;
ret = nfs_commit_inode(inode, flags);
if (ret > 0)