>From bc0c9079b48d "NFS handle COPY reply CB_OFFLOAD call race": + spin_lock(&server->nfs_client->cl_lock); + list_for_each_entry(copy, &server->nfs_client->pending_cb_stateids, + copies) { + if (memcmp(&res->write_res.stateid, ©->stateid, + NFS4_STATEID_SIZE)) + continue; + found_pending = true; + list_del(©->copies); + break; + } + if (found_pending) { + spin_unlock(&server->nfs_client->cl_lock); + goto out; + } copy = kzalloc(sizeof(struct nfs4_copy_state), GFP_NOFS); At this point we're still holding cl_lock. Best might be to allocate "copy" before taking the lock, then free it on any paths where we don't end up needing it. --b.