- data->cb(0, nfs, NULL, data->private_data);
+ nfsfh = malloc(sizeof(struct nfsfh));
+ if (nfsfh == NULL) {
+ rpc_set_error(nfs->rpc, "NFS: Failed to allocate nfsfh structure");
+ data->cb(-ENOMEM, nfs, rpc_get_error(nfs->rpc), data->private_data);
+ free_nfs_cb_data(data);
+ return;
+ }
+ memset(nfsfh, 0, sizeof(struct nfsfh));
+
+ if (data->continue_int & O_SYNC) {
+ nfsfh->is_sync = 1;
+ }
+
+ /* steal the filehandle */
+ nfsfh->fh = data->fh;
+ data->fh.data.data_val = NULL;
+
+ data->cb(0, nfs, nfsfh, data->private_data);