|
@@ -1431,15 +1431,17 @@ static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_contr
|
|
int flags = FLUSH_SYNC;
|
|
int flags = FLUSH_SYNC;
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
- /* Don't commit yet if this is a non-blocking flush and there are
|
|
|
|
- * lots of outstanding writes for this mapping.
|
|
|
|
- */
|
|
|
|
- if (wbc->sync_mode == WB_SYNC_NONE &&
|
|
|
|
- nfsi->ncommit <= (nfsi->npages >> 1))
|
|
|
|
- goto out_mark_dirty;
|
|
|
|
|
|
+ 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.
|
|
|
|
+ */
|
|
|
|
+ if (nfsi->ncommit <= (nfsi->npages >> 1))
|
|
|
|
+ goto out_mark_dirty;
|
|
|
|
|
|
- if (wbc->nonblocking || wbc->for_background)
|
|
|
|
|
|
+ /* don't wait for the COMMIT response */
|
|
flags = 0;
|
|
flags = 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
ret = nfs_commit_inode(inode, flags);
|
|
ret = nfs_commit_inode(inode, flags);
|
|
if (ret >= 0) {
|
|
if (ret >= 0) {
|
|
if (wbc->sync_mode == WB_SYNC_NONE) {
|
|
if (wbc->sync_mode == WB_SYNC_NONE) {
|