NFS: Run COMMIT as an asynchronous RPC call when wbc->for_background is set

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
This commit is contained in:
Trond Myklebust 2010-02-19 17:02:24 -08:00
parent 420e3646bb
commit 5bad5abec4

View file

@ -1426,7 +1426,7 @@ static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_contr
nfsi->ncommit <= (nfsi->npages >> 1))
goto out_mark_dirty;
if (wbc->nonblocking)
if (wbc->nonblocking || wbc->for_background)
flags = 0;
ret = nfs_commit_inode(inode, flags);
if (ret >= 0) {