aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-03-12 02:58:10 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-24 15:49:48 -0400
commitef31153786bc1e4304e6b9422cc8b9efef455611 (patch)
tree32739af2c6b0f2ab0fdf05e84b674d94721ffa6d /fs/nfs/write.c
parentde4b15c7e9fe9fdd1eb6333be0a08c822db1ca0e (diff)
NFSv4.1 convert layoutcommit sync to boolean
Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index a03c11f9081..85d75254328 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)
ret = nfs_commit_unstable_pages(inode, wbc);
if (ret >= 0 && test_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(inode)->flags)) {
- int status, sync = wbc->sync_mode;
+ int status;
+ bool sync = true;
- if (wbc->nonblocking || wbc->for_background)
- sync = 0;
+ if (wbc->sync_mode == WB_SYNC_NONE || wbc->nonblocking ||
+ wbc->for_background)
+ sync = false;
status = pnfs_layoutcommit_inode(inode, sync);
if (status < 0)