summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-19 11:20:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-19 11:20:48 -0700
commit1113cdfe7d2c1fe08b64caa3affe19260e66dd95 (patch)
tree6f14a78a5a991756bf0b9d538caff197d55de895 /fs/nfs/write.c
parent416716ed390782e373875f39b39ee23c91902688 (diff)
parentfeaff8e5b2cfc3eae02cf65db7a400b0b9ffc596 (diff)
downloadlinux-1113cdfe7d2c1fe08b64caa3affe19260e66dd95.tar.gz
linux-1113cdfe7d2c1fe08b64caa3affe19260e66dd95.tar.xz
Merge tag 'nfs-for-4.1-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull two NFS client bugfixes from Trond Myklebust: "Highlights include: - fix a Linux-4.1 regression affecting stat() - take an extra reference to fl->fl_file when running a setlk" * tag 'nfs-for-4.1-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: nfs: take extra reference to fl->fl_file when running a setlk nfs: stat(2) fails during cthon04 basic test5 on NFSv4.0
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index d12a4be613a5..dfc19f1575a1 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1845,12 +1845,15 @@ int nfs_wb_all(struct inode *inode)
trace_nfs_writeback_inode_enter(inode);
ret = filemap_write_and_wait(inode->i_mapping);
- if (!ret) {
- ret = nfs_commit_inode(inode, FLUSH_SYNC);
- if (!ret)
- pnfs_sync_inode(inode, true);
- }
+ if (ret)
+ goto out;
+ ret = nfs_commit_inode(inode, FLUSH_SYNC);
+ if (ret < 0)
+ goto out;
+ pnfs_sync_inode(inode, true);
+ ret = 0;
+out:
trace_nfs_writeback_inode_exit(inode, ret);
return ret;
}