aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_mount.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-01-05 17:19:26 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-01-05 17:19:26 +0000
commit2f304845e24500e279d9240911b92d3a87f5191b (patch)
treeccdf46a62417c8e64f21542de48579bf05a69030 /sys/kern/vfs_mount.c
parent2677b6e77f34f8032b71bf5005bd3780f6e17e6a (diff)
downloadsrc-2f304845e24500e279d9240911b92d3a87f5191b.tar.gz
src-2f304845e24500e279d9240911b92d3a87f5191b.zip
Do not allocate struct statfs on kernel stack.
Right now size of the structure is 472 bytes on amd64, which is already large and stack allocations are indesirable. With the ino64 work, MNAMELEN is increased to 1024, which will make it impossible to have struct statfs on the stack. Extracted from: ino64 work by gleb Discussed with: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
Notes
Notes: svn path=/head/; revision=311452
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r--sys/kern/vfs_mount.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 99bfb101f135..34bf1aaf456c 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -79,6 +79,7 @@ SYSCTL_INT(_vfs, OID_AUTO, usermount, CTLFLAG_RW, &usermount, 0,
"Unprivileged users may mount and unmount file systems");
MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure");
+MALLOC_DEFINE(M_STATFS, "statfs", "statfs structure");
static uma_zone_t mount_zone;
/* List of mounted filesystems. */