summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4super.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-02-20 11:55:12 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-02-20 11:55:12 +0100
commitbf5f48339a019c9b4b42284c3f45d58942cbda27 (patch)
tree79976135166ffbdaf4ccb91bcadb17ddb551f060 /fs/nfs/nfs4super.c
parentmac80211: remove erroneous comment about RX radiotap header (diff)
parentStaging: rtl8812ae: remove modules field of rate_control_ops (diff)
downloadlinux-bf5f48339a019c9b4b42284c3f45d58942cbda27.tar.xz
linux-bf5f48339a019c9b4b42284c3f45d58942cbda27.zip
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'fs/nfs/nfs4super.c')
-rw-r--r--fs/nfs/nfs4super.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c
index 65ab0a0ca1c4..808f29574412 100644
--- a/fs/nfs/nfs4super.c
+++ b/fs/nfs/nfs4super.c
@@ -77,17 +77,9 @@ static int nfs4_write_inode(struct inode *inode, struct writeback_control *wbc)
{
int ret = nfs_write_inode(inode, wbc);
- if (ret >= 0 && test_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(inode)->flags)) {
- int status;
- bool sync = true;
-
- if (wbc->sync_mode == WB_SYNC_NONE)
- sync = false;
-
- status = pnfs_layoutcommit_inode(inode, sync);
- if (status < 0)
- return status;
- }
+ if (ret == 0)
+ ret = pnfs_layoutcommit_inode(inode,
+ wbc->sync_mode == WB_SYNC_ALL);
return ret;
}