diff options
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index a03c11f9081e..85d75254328e 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -1566,10 +1566,12 @@ int nfs_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
1566 | 1566 | ||
1567 | ret = nfs_commit_unstable_pages(inode, wbc); | 1567 | ret = nfs_commit_unstable_pages(inode, wbc); |
1568 | if (ret >= 0 && test_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(inode)->flags)) { | 1568 | if (ret >= 0 && test_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(inode)->flags)) { |
1569 | int status, sync = wbc->sync_mode; | 1569 | int status; |
1570 | bool sync = true; | ||
1570 | 1571 | ||
1571 | if (wbc->nonblocking || wbc->for_background) | 1572 | if (wbc->sync_mode == WB_SYNC_NONE || wbc->nonblocking || |
1572 | sync = 0; | 1573 | wbc->for_background) |
1574 | sync = false; | ||
1573 | 1575 | ||
1574 | status = pnfs_layoutcommit_inode(inode, sync); | 1576 | status = pnfs_layoutcommit_inode(inode, sync); |
1575 | if (status < 0) | 1577 | if (status < 0) |