summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
committeralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
commitbf8e8a6e8f0bd9165109f0a258730dd242299815 (patch)
treef16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/geom
parent2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff)
downloadFreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip
FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/bde/g_bde.c2
-rw-r--r--sys/geom/geom_aes.c6
-rw-r--r--sys/geom/geom_ccd.c20
-rw-r--r--sys/geom/geom_ctl.c2
-rw-r--r--sys/geom/geom_dev.c2
-rw-r--r--sys/geom/geom_disk.c2
-rw-r--r--sys/geom/geom_event.c2
-rw-r--r--sys/geom/geom_gpt.c2
-rw-r--r--sys/geom/geom_io.c2
-rw-r--r--sys/geom/geom_mirror.c2
-rw-r--r--sys/geom/geom_slice.c8
-rw-r--r--sys/geom/geom_subr.c14
12 files changed, 32 insertions, 32 deletions
diff --git a/sys/geom/bde/g_bde.c b/sys/geom/bde/g_bde.c
index a3ae631..b147a9c 100644
--- a/sys/geom/bde/g_bde.c
+++ b/sys/geom/bde/g_bde.c
@@ -212,7 +212,7 @@ g_bde_config(struct g_configargs *ga)
while (1) {
sectorsize = cp->provider->sectorsize;
mediasize = cp->provider->mediasize;
- sc = g_malloc(sizeof(struct g_bde_softc), M_WAITOK | M_ZERO);
+ sc = g_malloc(sizeof(struct g_bde_softc), M_ZERO);
gp->softc = sc;
sc->geom = gp;
sc->consumer = cp;
diff --git a/sys/geom/geom_aes.c b/sys/geom/geom_aes.c
index 72f0d3d..5471cbf 100644
--- a/sys/geom/geom_aes.c
+++ b/sys/geom/geom_aes.c
@@ -148,7 +148,7 @@ g_aes_read_done(struct bio *bp)
gp = bp->bio_from->geom;
sc = gp->softc;
- sb = g_malloc(sc->sectorsize, M_WAITOK);
+ sb = g_malloc(sc->sectorsize, 0);
b = bp->bio_data;
e = bp->bio_data;
e += bp->bio_length;
@@ -211,7 +211,7 @@ g_aes_start(struct bio *bp)
}
bp2->bio_done = g_aes_write_done;
bp2->bio_offset += sc->sectorsize;
- bp2->bio_data = g_malloc(bp->bio_length, M_WAITOK);
+ bp2->bio_data = g_malloc(bp->bio_length, 0);
b = bp->bio_data;
e = bp->bio_data;
e += bp->bio_length;
@@ -322,7 +322,7 @@ g_aes_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
if (buf == NULL || error != 0) {
break;
}
- sc = g_malloc(sizeof(struct g_aes_softc), M_WAITOK | M_ZERO);
+ sc = g_malloc(sizeof(struct g_aes_softc), M_ZERO);
if (!memcmp(buf, aes_magic, strlen(aes_magic))) {
sc->keying = KEY_ZERO;
} else if (!memcmp(buf, aes_magic_random,
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index 103a54b..7569420 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -206,7 +206,7 @@ ccdnew(int unit)
if (IS_ALLOCATED(unit) || unit > 32)
return (NULL);
- MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_WAITOK | M_ZERO);
+ MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_ZERO);
sc->sc_unit = unit;
LIST_INSERT_HEAD(&ccd_softc_list, sc, list);
/* XXX: UNLOCK(unique unit numbers) */
@@ -283,7 +283,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
/* Allocate space for the component info. */
cs->sc_cinfo = malloc(cs->sc_nccdisks * sizeof(struct ccdcinfo),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
/*
* Verify that each component piece exists and record
@@ -291,7 +291,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
*/
maxsecsize = 0;
minsize = 0;
- tmppath = malloc(MAXPATHLEN, M_CCD, M_WAITOK);
+ tmppath = malloc(MAXPATHLEN, M_CCD, 0);
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
vp = cs->sc_vpp[ix];
ci = &cs->sc_cinfo[ix];
@@ -304,7 +304,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
MAXPATHLEN, &ci->ci_pathlen)) != 0) {
goto fail;
}
- ci->ci_path = malloc(ci->ci_pathlen, M_CCD, M_WAITOK);
+ ci->ci_path = malloc(ci->ci_pathlen, M_CCD, 0);
bcopy(tmppath, ci->ci_path, ci->ci_pathlen);
ci->ci_dev = vn_todev(vp);
@@ -459,7 +459,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
*/
size = (cs->sc_nccdisks + 1) * sizeof(struct ccdiinfo);
cs->sc_itable = (struct ccdiinfo *)malloc(size, M_CCD,
- M_WAITOK | M_ZERO);
+ M_ZERO);
/*
* Trivial case: no interleave (actually interleave of disk size).
@@ -473,7 +473,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
/* Allocate space for ii_index. */
- ii->ii_index = malloc(sizeof(int), M_CCD, M_WAITOK);
+ ii->ii_index = malloc(sizeof(int), M_CCD, 0);
ii->ii_ndisk = 1;
ii->ii_startblk = bn;
ii->ii_startoff = 0;
@@ -496,7 +496,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
* we use.
*/
ii->ii_index = malloc((sizeof(int) * cs->sc_nccdisks),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
/*
* Locate the smallest of the remaining components
@@ -1107,9 +1107,9 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
* componet pathnames and device numbers.
*/
cpp = malloc(ccio->ccio_ndisks * sizeof(char *),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
vpp = malloc(ccio->ccio_ndisks * sizeof(struct vnode *),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
error = copyin((caddr_t)ccio->ccio_disks, (caddr_t)cpp,
ccio->ccio_ndisks * sizeof(char **));
@@ -1164,7 +1164,7 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
*/
ccio->ccio_unit = unit;
ccio->ccio_size = cs->sc_size;
- cs->sc_disk = malloc(sizeof(struct disk), M_CCD, M_WAITOK);
+ cs->sc_disk = malloc(sizeof(struct disk), M_CCD, 0);
cs->sc_dev = disk_create(unit, cs->sc_disk, 0,
&ccd_cdevsw, &ccddisk_cdevsw);
cs->sc_dev->si_drv1 = cs;
diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c
index 48bac22..b3cd331 100644
--- a/sys/geom/geom_ctl.c
+++ b/sys/geom/geom_ctl.c
@@ -174,7 +174,7 @@ g_ctl_ioctl_configgeom(dev_t dev, u_long cmd, caddr_t data, int fflag, struct th
else if (gcp->len == 0) {
ga.ptr = NULL;
} else {
- ga.ptr = g_malloc(gcp->len, M_WAITOK);
+ ga.ptr = g_malloc(gcp->len, 0);
error = copyin(gcp->ptr, ga.ptr, gcp->len);
if (error) {
g_free(ga.ptr);
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index fd2b44d..36634e2 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -302,7 +302,7 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
break;
default:
- gio = g_malloc(sizeof *gio, M_WAITOK | M_ZERO);
+ gio = g_malloc(sizeof *gio, M_ZERO);
gio->cmd = cmd;
gio->data = data;
gio->fflag = fflag;
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 4c219a1..05a052f 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -250,7 +250,7 @@ disk_create(int unit, struct disk *dp, int flags, struct cdevsw *cdevsw, struct
{
dev_t dev;
- dev = g_malloc(sizeof *dev, M_WAITOK | M_ZERO);
+ dev = g_malloc(sizeof *dev, M_ZERO);
dp->d_dev = dev;
dp->d_devsw = cdevsw;
dev->si_devsw = cdevsw;
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c
index 1b657e9..228bc06 100644
--- a/sys/geom/geom_event.c
+++ b/sys/geom/geom_event.c
@@ -266,7 +266,7 @@ g_post_event(enum g_events ev, struct g_class *mp, struct g_geom *gp, struct g_p
g_trace(G_T_TOPOLOGY, "g_post_event(%d, %p, %p, %p, %p)",
ev, mp, gp, pp, cp);
g_topology_assert();
- ep = g_malloc(sizeof *ep, M_WAITOK | M_ZERO);
+ ep = g_malloc(sizeof *ep, M_ZERO);
ep->event = ev;
if (mp != NULL) {
ep->class = mp;
diff --git a/sys/geom/geom_gpt.c b/sys/geom/geom_gpt.c
index 6b046c4..a54d9a2 100644
--- a/sys/geom/geom_gpt.c
+++ b/sys/geom/geom_gpt.c
@@ -220,7 +220,7 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist)
ent = (void*)(buf + i * hdr->hdr_entsz);
if (!memcmp(&ent->ent_type, &unused, sizeof(unused)))
continue;
- gs->part[i] = g_malloc(hdr->hdr_entsz, M_WAITOK);
+ gs->part[i] = g_malloc(hdr->hdr_entsz, 0);
if (gs->part[i] == NULL)
break;
bcopy(ent, gs->part[i], hdr->hdr_entsz);
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index dfc490c..8309a24 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -390,7 +390,7 @@ g_read_data(struct g_consumer *cp, off_t offset, off_t length, int *error)
bp->bio_done = NULL;
bp->bio_offset = offset;
bp->bio_length = length;
- ptr = g_malloc(length, M_WAITOK);
+ ptr = g_malloc(length, 0);
bp->bio_data = ptr;
g_io_request(bp, cp);
errorc = biowait(bp, "gread");
diff --git a/sys/geom/geom_mirror.c b/sys/geom/geom_mirror.c
index 23e2f52..db426cd 100644
--- a/sys/geom/geom_mirror.c
+++ b/sys/geom/geom_mirror.c
@@ -214,7 +214,7 @@ g_mirror_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
g_topology_unlock();
break;
}
- gp->softc = g_malloc(sizeof(struct g_mirror_softc), M_WAITOK);
+ gp->softc = g_malloc(sizeof(struct g_mirror_softc), 0);
sc = gp->softc;
memcpy(sc->magic, buf + 16, sizeof sc->magic);
g_topology_lock();
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c
index c097e7f..e5aaf0f 100644
--- a/sys/geom/geom_slice.c
+++ b/sys/geom/geom_slice.c
@@ -71,10 +71,10 @@ g_slice_init(unsigned nslice, unsigned scsize)
{
struct g_slicer *gsp;
- gsp = g_malloc(sizeof *gsp, M_WAITOK | M_ZERO);
- gsp->softc = g_malloc(scsize, M_WAITOK | M_ZERO);
+ gsp = g_malloc(sizeof *gsp, M_ZERO);
+ gsp->softc = g_malloc(scsize, M_ZERO);
gsp->slices = g_malloc(nslice * sizeof(struct g_slice),
- M_WAITOK | M_ZERO);
+ M_ZERO);
gsp->nslice = nslice;
return (gsp);
}
@@ -371,7 +371,7 @@ g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t offset, off_t length)
gsp = gp->softc;
gsl = gsp->hot;
if(idx >= gsp->nhot) {
- gsl2 = g_malloc((idx + 1) * sizeof *gsl2, M_WAITOK | M_ZERO);
+ gsl2 = g_malloc((idx + 1) * sizeof *gsl2, M_ZERO);
if (gsp->hot != NULL)
bcopy(gsp->hot, gsl2, gsp->nhot * sizeof *gsl2);
gsp->hot = gsl2;
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 954c616..7c1c4c1 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -99,9 +99,9 @@ g_new_geomf(struct g_class *mp, const char *fmt, ...)
sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND);
sbuf_vprintf(sb, fmt, ap);
sbuf_finish(sb);
- gp = g_malloc(sizeof *gp, M_WAITOK | M_ZERO);
+ gp = g_malloc(sizeof *gp, M_ZERO);
gp->protect = 0x020016601;
- gp->name = g_malloc(sbuf_len(sb) + 1, M_WAITOK | M_ZERO);
+ gp->name = g_malloc(sbuf_len(sb) + 1, M_ZERO);
gp->class = mp;
gp->rank = 1;
LIST_INIT(&gp->consumer);
@@ -142,7 +142,7 @@ g_new_consumer(struct g_geom *gp)
("g_new_consumer on geom(%s) (class %s) without orphan",
gp->name, gp->class->name));
- cp = g_malloc(sizeof *cp, M_WAITOK | M_ZERO);
+ cp = g_malloc(sizeof *cp, M_ZERO);
cp->protect = 0x020016602;
cp->geom = gp;
LIST_INSERT_HEAD(&gp->consumer, cp, consumer);
@@ -176,7 +176,7 @@ g_new_providerf(struct g_geom *gp, const char *fmt, ...)
sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND);
sbuf_vprintf(sb, fmt, ap);
sbuf_finish(sb);
- pp = g_malloc(sizeof *pp + sbuf_len(sb) + 1, M_WAITOK | M_ZERO);
+ pp = g_malloc(sizeof *pp + sbuf_len(sb) + 1, M_ZERO);
pp->protect = 0x020016603;
pp->name = (char *)(pp + 1);
strcpy(pp->name, sbuf_data(sb));
@@ -675,7 +675,7 @@ g_idclass(struct geomidorname *p)
return (mp);
return (NULL);
}
- n = g_malloc(p->len + 1, M_WAITOK);
+ n = g_malloc(p->len + 1, 0);
if (copyin(p->u.name, n, p->len) == 0) {
n[p->len] = '\0';
LIST_FOREACH(mp, &g_classes, class)
@@ -702,7 +702,7 @@ g_idgeom(struct geomidorname *p)
return (gp);
return (NULL);
}
- n = g_malloc(p->len + 1, M_WAITOK);
+ n = g_malloc(p->len + 1, 0);
if (copyin(p->u.name, n, p->len) == 0) {
n[p->len] = '\0';
LIST_FOREACH(mp, &g_classes, class)
@@ -732,7 +732,7 @@ g_idprovider(struct geomidorname *p)
return (pp);
return (NULL);
}
- n = g_malloc(p->len + 1, M_WAITOK);
+ n = g_malloc(p->len + 1, 0);
if (copyin(p->u.name, n, p->len) == 0) {
n[p->len] = '\0';
LIST_FOREACH(mp, &g_classes, class)
OpenPOWER on IntegriCloud