diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-25 00:08:31 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-25 00:08:31 +0300 |
commit | 362745268ce119c473952b30f57d947bdede7f7a (patch) | |
tree | d5632a60c88af58d77914c421ab11596b3c450f5 /fs/nfs/pnfs_nfs.c | |
parent | 7f94ed24958d790687296701175cc43a6027c6c5 (diff) | |
parent | e033fb51ebb2983ee17b4a1b96ccbaedb137d9e9 (diff) | |
download | linux-362745268ce119c473952b30f57d947bdede7f7a.tar.xz |
Merge branch 'writeback'
Diffstat (limited to 'fs/nfs/pnfs_nfs.c')
-rw-r--r-- | fs/nfs/pnfs_nfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c index fe183fbc4b90..f3468b57a32a 100644 --- a/fs/nfs/pnfs_nfs.c +++ b/fs/nfs/pnfs_nfs.c @@ -940,6 +940,13 @@ EXPORT_SYMBOL_GPL(pnfs_layout_mark_request_commit); int pnfs_nfs_generic_sync(struct inode *inode, bool datasync) { + int ret; + + if (!pnfs_layoutcommit_outstanding(inode)) + return 0; + ret = nfs_commit_inode(inode, FLUSH_SYNC); + if (ret < 0) + return ret; if (datasync) return 0; return pnfs_layoutcommit_inode(inode, true); |