/* * Unmount a single node */ int * amqproc_umnt_1_svc(voidp argp, struct svc_req *rqstp) { static int res = AMQ_UMNT_OK; am_node *mp = find_ap(*(char **) argp); if (mp) forcibly_timeout_mp(mp); return &res; }
/*ARGSUSED*/ void * amqproc_umnt_1(void *argp, struct svc_req *rqstp) { static char res; am_node *mp = find_ap(*(char **) argp); if (mp) forcibly_timeout_mp(mp); return (void *)&res; }
static nfsstat * unlink_or_rmdir(nfsdiropargs *argp, struct svc_req *rqstp, int unlinkp) { static nfsstat res; int retry; am_node *mp = fh_to_mp3(&argp->da_fhandle, &retry, VLOOK_DELETE); if (mp == NULL) { if (retry < 0) { amd_stats.d_drops++; return 0; } res = nfs_error(retry); goto out; } if (mp->am_fattr.na_type != NFDIR) { res = nfs_error(ENOTDIR); goto out; } if (amuDebug(D_TRACE)) plog(XLOG_DEBUG, "\tremove(%s, %s)", mp->am_path, argp->da_name); mp = mp->am_al->al_mnt->mf_ops->lookup_child(mp, argp->da_name, &retry, VLOOK_DELETE); if (mp == NULL) { /* * Ignore retries... */ if (retry < 0) retry = 0; /* * Usual NFS workaround... */ else if (retry == ENOENT) retry = 0; res = nfs_error(retry); } else { forcibly_timeout_mp(mp); res = NFS_OK; } out: return &res; }