diff options
author | Bryan Cantrill <bryan@joyent.com> | 2013-03-11 18:02:14 +0000 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2013-03-11 18:46:31 +0000 |
commit | eddec1f8e073d28091aae9c7be37f7c6e433cfb0 (patch) | |
tree | 87f96226a6b3d91364255d657cad6b033359c904 /usr/src/uts/common/fs/tmpfs/tmp_dir.c | |
parent | 077880e88374f944d97873eb2b40105b7a775345 (diff) | |
download | illumos-joyent-eddec1f8e073d28091aae9c7be37f7c6e433cfb0.tar.gz |
OS-1882 full tmpfs can cause GZ svc.configd to die and not be restartable
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/uts/common/fs/tmpfs/tmp_dir.c')
-rw-r--r-- | usr/src/uts/common/fs/tmpfs/tmp_dir.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/uts/common/fs/tmpfs/tmp_dir.c b/usr/src/uts/common/fs/tmpfs/tmp_dir.c index f6621c8097..387cc6ae54 100644 --- a/usr/src/uts/common/fs/tmpfs/tmp_dir.c +++ b/usr/src/uts/common/fs/tmpfs/tmp_dir.c @@ -516,7 +516,7 @@ tdirdelete( */ namelen = strlen(tpdp->td_name) + 1; - tmp_memfree(tpdp, sizeof (struct tdirent) + namelen); + kmem_free(tpdp, sizeof (struct tdirent) + namelen); dir->tn_size -= (sizeof (struct tdirent) + namelen); dir->tn_dirents--; @@ -549,8 +549,8 @@ tdirinit( ASSERT(RW_WRITE_HELD(&parent->tn_rwlock)); ASSERT(dir->tn_type == VDIR); - dot = tmp_memalloc(sizeof (struct tdirent) + 2, TMP_MUSTHAVE); - dotdot = tmp_memalloc(sizeof (struct tdirent) + 3, TMP_MUSTHAVE); + dot = kmem_zalloc(sizeof (struct tdirent) + 2, KM_SLEEP); + dotdot = kmem_zalloc(sizeof (struct tdirent) + 3, KM_SLEEP); /* * Initialize the entries @@ -650,7 +650,7 @@ tdirtrunc(struct tmpnode *dir) tmpfs_hash_out(tdp); - tmp_memfree(tdp, sizeof (struct tdirent) + namelen); + kmem_free(tdp, sizeof (struct tdirent) + namelen); dir->tn_size -= (sizeof (struct tdirent) + namelen); dir->tn_dirents--; } @@ -925,7 +925,7 @@ tdiraddentry( */ namelen = strlen(name) + 1; alloc_size = namelen + sizeof (struct tdirent); - tdp = tmp_memalloc(alloc_size, 0); + tdp = kmem_zalloc(alloc_size, KM_NOSLEEP | KM_NORMALPRI); if (tdp == NULL) return (ENOSPC); @@ -1025,7 +1025,7 @@ tdirmaketnode( ((va->va_mask & AT_MTIME) && TIMESPEC_OVERFLOW(&va->va_mtime))) return (EOVERFLOW); type = va->va_type; - tp = tmp_memalloc(sizeof (struct tmpnode), TMP_MUSTHAVE); + tp = kmem_zalloc(sizeof (struct tmpnode), KM_SLEEP); tmpnode_init(tm, tp, va, cred); /* setup normal file/dir's extended attribute directory */ |