Peng Tao points out that the call to pnfs_mark_matching_lsegs_return()
could race with pnfs_put_lseg(), in which case the layout segment is
cleared, but no layoutreturn will be sent.
Fix is to replace the call to pnfs_mark_matching_lsegs_invalid().
Reported-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
goto unlock;
}
- if (pnfs_mark_matching_lsegs_invalid(lo, &free_me_list,
+ if (pnfs_mark_matching_lsegs_return(lo, &free_me_list,
&args->cbl_range)) {
- pnfs_mark_matching_lsegs_return(lo,
- &free_me_list,
- &args->cbl_range);
rv = NFS4_OK;
goto unlock;
}