提交 4b0934ba 编写于 作者: T Trond Myklebust

NFSv4.1/pNFS: Fix a race in initiate_file_draining()

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: NPeng Tao <tao.peng@primarydata.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 10335556
......@@ -216,11 +216,8 @@ static u32 initiate_file_draining(struct nfs_client *clp,
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册