summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2021-10-04 15:37:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 19:17:02 +0100
commit9443fcc22a6cbe0caf1c83f756a0416e83ddb07f (patch)
tree9053cc6d90873d56125b751e53a8a3ccb0304879 /include
parentb07aa21474d3e6c84eb4e3838b6f3da0789f4fdb (diff)
downloadlinux-9443fcc22a6cbe0caf1c83f756a0416e83ddb07f.tar.gz
linux-9443fcc22a6cbe0caf1c83f756a0416e83ddb07f.tar.bz2
linux-9443fcc22a6cbe0caf1c83f756a0416e83ddb07f.zip
NFS: Fix up commit deadlocks
[ Upstream commit 133a48abf6ecc535d7eddc6da1c3e4c972445882 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index b9a8b925db43..4d95cc999d12 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -569,6 +569,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)