]> git.baikalelectronics.ru Git - kernel.git/commit
NFS/pNFS: Don't leak DS commits in pnfs_generic_retry_commit()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 6 Jan 2021 16:54:57 +0000 (11:54 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 10 Jan 2021 18:32:52 +0000 (13:32 -0500)
commit77d9e42de5232cd5c7d900731276fc48250e8716
tree8f0287d8612116558e0684281057f9af955c039d
parent755c85b4f0a6574c71d0e871b131ed3424f86bc7
NFS/pNFS: Don't leak DS commits in pnfs_generic_retry_commit()

We must ensure that we pass a layout segment to nfs_retry_commit() when
we're cleaning up after pnfs_bucket_alloc_ds_commits(). Otherwise,
requests that should be committed to the DS will get committed to the
MDS.
Do so by ensuring that pnfs_bucket_get_committing() always tries to
return a layout segment when it returns a non-empty page list.

Fixes: 0ab745e026a4 ("NFS/pNFS: Simplify bucket layout segment reference counting")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pnfs_nfs.c