pNFS: pnfs_roc_drain() fix a race with open
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 9 Jul 2015 21:54:09 +0000 (23:54 +0200)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 11 Jul 2015 14:16:17 +0000 (16:16 +0200)
commitbdc59cf233433ddd2cd671db02bd6b52323ce63d
treeed2347c0ea6a3a0e68854c56a712d9f6a52a2215
parent7f27392cd4cbcadeeaff9eedebcaec8fae9aec8e
pNFS: pnfs_roc_drain() fix a race with open

If a process reopens the file before we can send off the CLOSE/DELEGRETURN,
then pnfs_roc_drain() may end up waiting for a new set of layout segments
that are marked as return-on-close, but haven't yet been returned.

Fix this by only waiting for those layout segments that were invalidated in
pnfs_roc().

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/pnfs.c