提交 9aeaf8cf 编写于 作者: O Olga Kornievskaia 提交者: Anna Schumaker

NFSv4.2 fix async copy reboot recovery

Original commit (e4648aa4 "NFS recover from destination server
reboot for copies") used memcmp() and then it was changed to use
nfs4_stateid_match_other() but that function returns opposite of
memcmp. As the result, recovery can't find the copy leading
to copy hanging.

Fixes: 80f42368 ("NFSv4: Split out NFS v4.2 copy completion functions")
Fixes: cb7a8384 ("NFS: Split out the body of nfs4_reclaim_open_state")
Signed-of-by: NOlga Kornievskaia <kolga@netapp.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
上级 f85adb1b
......@@ -1555,7 +1555,7 @@ static void nfs42_complete_copies(struct nfs4_state_owner *sp, struct nfs4_state
spin_lock(&sp->so_server->nfs_client->cl_lock);
list_for_each_entry(copy, &sp->so_server->ss_copies, copies) {
if (nfs4_stateid_match_other(&state->stateid, &copy->parent_state->stateid))
if (!nfs4_stateid_match_other(&state->stateid, &copy->parent_state->stateid))
continue;
copy->flags = 1;
complete(&copy->completion);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册