NFS: Run COMMIT as an asynchronous RPC call when wbc->for_background is set
Trond Myklebust [Sat, 20 Feb 2010 01:02:24 +0000 (17:02 -0800)]
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

index fc05e35..704e67d 100644 (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) {