diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-10-04 22:37:42 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-10-21 01:09:45 +0300 |
commit | 133a48abf6ecc535d7eddc6da1c3e4c972445882 (patch) | |
tree | 728289e9049585b06b92c260117e4b78314d1e3b /include | |
parent | 64a93dbf25d3a1368bb58ddf0f61d0a92d7479e3 (diff) | |
download | linux-133a48abf6ecc535d7eddc6da1c3e4c972445882.tar.xz |
NFS: Fix up commit deadlocks
If O_DIRECT bumps the commit_info rpcs_out field, then that could lead
to fsync() hangs. The fix is to ensure that O_DIRECT calls
nfs_commit_end().
Fixes: 723c921e7dfc ("sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nfs_fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index ca547cc5458c..e58b78da7a98 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -568,6 +568,7 @@ extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); extern int nfs_commit_inode(struct inode *, int); extern struct nfs_commit_data *nfs_commitdata_alloc(bool never_fail); extern void nfs_commit_free(struct nfs_commit_data *data); +bool nfs_commit_end(struct nfs_mds_commit_info *cinfo); static inline int nfs_have_writebacks(struct inode *inode) |