NFS: Fix races nfs_page_group_destroy() vs nfs_destroy_unlinked_subrequests()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 1 Apr 2020 17:04:49 +0000 (13:04 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 1 Apr 2020 17:34:28 +0000 (13:34 -0400)
commit08ca8b21f760c0ed5034a5c122092eec22ccf8f4
tree353ac3390753c2e92e5238c0499f0cbbb8eae294
parentadd42de31721fa29ed77a7ce388674d69f9d31a4
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>
fs/nfs/pagelist.c
fs/nfs/write.c
include/linux/nfs_page.h