diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-04-01 13:04:49 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-04-01 13:34:28 -0400 |
commit | 08ca8b21f760c0ed5034a5c122092eec22ccf8f4 (patch) | |
tree | 353ac3390753c2e92e5238c0499f0cbbb8eae294 /include/linux/nfs_page.h | |
parent | add42de31721fa29ed77a7ce388674d69f9d31a4 (diff) | |
download | lwn-08ca8b21f760c0ed5034a5c122092eec22ccf8f4.tar.gz lwn-08ca8b21f760c0ed5034a5c122092eec22ccf8f4.zip |
NFS: Fix races nfs_page_group_destroy() vs nfs_destroy_unlinked_subrequests()
When a subrequest is being detached from the subgroup, we want to
ensure that it is not holding the group lock, or in the process
of waiting for the group lock.
Fixes: 5b2b5187fa85 ("NFS: Fix nfs_page_group_destroy() and nfs_lock_and_join_requests() race cases")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include/linux/nfs_page.h')
-rw-r--r-- | include/linux/nfs_page.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 0bbd587fac6a..7e9419d74b86 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -142,6 +142,8 @@ extern void nfs_unlock_and_release_request(struct nfs_page *); extern int nfs_page_group_lock(struct nfs_page *); extern void nfs_page_group_unlock(struct nfs_page *); extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int); +extern int nfs_page_set_headlock(struct nfs_page *req); +extern void nfs_page_clear_headlock(struct nfs_page *req); extern bool nfs_async_iocounter_wait(struct rpc_task *, struct nfs_lock_context *); /* |