summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs
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/fs/devfs
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/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs_devs.c10
-rw-r--r--sys/fs/devfs/devfs_rule.c6
-rw-r--r--sys/fs/devfs/devfs_vfsops.c4
-rw-r--r--sys/fs/devfs/devfs_vnops.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index 3b9a1bb..dfd7120 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -153,11 +153,11 @@ devfs_attemptoverflow(int insist)
or = NULL;
n = devfs_noverflowwant;
nb = sizeof (dev_t *) * n;
- MALLOC(ot, dev_t **, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO);
+ MALLOC(ot, dev_t **, nb, M_DEVFS, (insist ? 0 : M_NOWAIT) | M_ZERO);
if (ot == NULL)
goto bail;
nb = sizeof (int) * n;
- MALLOC(or, int *, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO);
+ MALLOC(or, int *, nb, M_DEVFS, (insist ? 0 : M_NOWAIT) | M_ZERO);
if (or == NULL)
goto bail;
if (!atomic_cmpset_ptr(&devfs_overflow, NULL, ot))
@@ -200,7 +200,7 @@ devfs_newdirent(char *name, int namelen)
d.d_namlen = namelen;
i = sizeof (*de) + GENERIC_DIRSIZ(&d);
- MALLOC(de, struct devfs_dirent *, i, M_DEVFS, M_WAITOK | M_ZERO);
+ MALLOC(de, struct devfs_dirent *, i, M_DEVFS, M_ZERO);
de->de_dirent = (struct dirent *)(de + 1);
de->de_dirent->d_namlen = namelen;
de->de_dirent->d_reclen = GENERIC_DIRSIZ(&d);
@@ -295,7 +295,7 @@ devfs_populate(struct devfs_mount *dm)
if (devfs_noverflow && dm->dm_overflow == NULL) {
i = devfs_noverflow * sizeof (struct devfs_dirent *);
MALLOC(dm->dm_overflow, struct devfs_dirent **, i,
- M_DEVFS, M_WAITOK | M_ZERO);
+ M_DEVFS, M_ZERO);
}
while (dm->dm_generation != devfs_generation) {
dm->dm_generation = devfs_generation;
@@ -353,7 +353,7 @@ devfs_populate(struct devfs_mount *dm)
de->de_dirent->d_type = DT_LNK;
pdev = dev->si_parent;
j = strlen(pdev->si_name) + 1;
- MALLOC(de->de_symlink, char *, j, M_DEVFS, M_WAITOK);
+ MALLOC(de->de_symlink, char *, j, M_DEVFS, 0);
bcopy(pdev->si_name, de->de_symlink, j);
} else {
de->de_inode = i;
diff --git a/sys/fs/devfs/devfs_rule.c b/sys/fs/devfs/devfs_rule.c
index f9787d5..34dd327 100644
--- a/sys/fs/devfs/devfs_rule.c
+++ b/sys/fs/devfs/devfs_rule.c
@@ -223,7 +223,7 @@ devfs_rules_ioctl(struct mount *mp, u_long cmd, caddr_t data, struct thread *td)
error = ESRCH;
goto out;
}
- dk = malloc(sizeof(*dk), M_TEMP, M_WAITOK | M_ZERO);
+ dk = malloc(sizeof(*dk), M_TEMP, M_ZERO);
memcpy(&dk->dk_rule, dr, sizeof(*dr));
lockmgr(&dm->dm_lock, LK_UPGRADE, 0, td);
devfs_rule_applydm(dk, dm);
@@ -557,7 +557,7 @@ devfs_rule_insert(struct devfs_rule *dr)
return (error);
}
- dk = malloc(sizeof(*dk), M_DEVFS, M_WAITOK);
+ dk = malloc(sizeof(*dk), M_DEVFS, 0);
dk->dk_ruleset = ds;
if (dsi != NULL)
++dsi->ds_refcount;
@@ -750,7 +750,7 @@ devfs_ruleset_create(devfs_rsnum rsnum)
KASSERT(devfs_ruleset_bynum(rsnum) == NULL,
("creating already existent ruleset %d", rsnum));
- ds = malloc(sizeof(*ds), M_DEVFS, M_WAITOK | M_ZERO);
+ ds = malloc(sizeof(*ds), M_DEVFS, M_ZERO);
ds->ds_number = rsnum;
ds->ds_refcount = ds->ds_flags = 0;
SLIST_INIT(&ds->ds_rules);
diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c
index e74b4e9..4c32ffa 100644
--- a/sys/fs/devfs/devfs_vfsops.c
+++ b/sys/fs/devfs/devfs_vfsops.c
@@ -78,10 +78,10 @@ devfs_nmount(mp, ndp, td)
return (EOPNOTSUPP);
MALLOC(fmp, struct devfs_mount *, sizeof(struct devfs_mount),
- M_DEVFS, M_WAITOK | M_ZERO);
+ M_DEVFS, M_ZERO);
MALLOC(fmp->dm_dirent, struct devfs_dirent **,
sizeof(struct devfs_dirent *) * NDEVFSINO,
- M_DEVFS, M_WAITOK | M_ZERO);
+ M_DEVFS, M_ZERO);
lockinit(&fmp->dm_lock, PVFS, "devfs", 0, LK_NOPAUSE);
mp->mnt_flag |= MNT_LOCAL;
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 6f466ad..16d40a3 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -608,7 +608,7 @@ devfs_readdir(ap)
}
if( !error && ap->a_ncookies != NULL && ap->a_cookies != NULL ) {
MALLOC(cookiebuf, u_long *, ncookies * sizeof(u_long),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
cookiep = cookiebuf;
dps = (struct dirent *)((char *)uio->uio_iov->iov_base -
(uio->uio_offset - oldoff));
@@ -859,7 +859,7 @@ devfs_symlink(ap)
de->de_inode = dmp->dm_inode++;
de->de_dirent->d_type = DT_LNK;
i = strlen(ap->a_target) + 1;
- MALLOC(de->de_symlink, char *, i, M_DEVFS, M_WAITOK);
+ MALLOC(de->de_symlink, char *, i, M_DEVFS, 0);
bcopy(ap->a_target, de->de_symlink, i);
lockmgr(&dmp->dm_lock, LK_EXCLUSIVE, 0, curthread);
#ifdef MAC
OpenPOWER on IntegriCloud