outside of the NFS LOOKUP method call. It needs this to reply to the
NFS LOOKUP call that initiated the mount.
Now there are functions that avoid transport corruption if another
request comes in during the backgroud mount make nfs_quick_reply()
use them.
From: Ian Kent
*/
if (current_transp && !new_mp->am_transp) {
dlog("Saving RPC transport for %s", new_mp->am_path);
- new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT));
- *(new_mp->am_transp) = *current_transp;
+ new_mp->am_transp = get_nfs_xprt(current_transp);
}
if (error && new_mp->am_al && new_mp->am_al->al_mnt &&
(new_mp->am_al->al_mnt->mf_ops == &amfs_error_ops))
XFREE(mp->am_name);
XFREE(mp->am_path);
XFREE(mp->am_pref);
- XFREE(mp->am_transp);
+ put_nfs_xprt(mp->am_transp);
if (mp->am_al)
free_loc(mp->am_al);
/*
* Free up transp. It's only used for one reply.
*/
- XFREE(mp->am_transp);
+ put_nfs_xprt(mp->am_transp);
+ mp->am_transp = NULL;
dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount);
}
}