Date: Thu, 8 Mar 2012 20:34:13 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r232702 - head/sys/kern Message-ID: <201203082034.q28KYDwq063702@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Thu Mar 8 20:34:13 2012 New Revision: 232702 URL: http://svn.freebsd.org/changeset/base/232702 Log: Free up allocated memory used by posix_fadvise(2). Modified: head/sys/kern/kern_descrip.c head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Mar 8 20:27:20 2012 (r232701) +++ head/sys/kern/kern_descrip.c Thu Mar 8 20:34:13 2012 (r232702) @@ -104,6 +104,8 @@ static MALLOC_DEFINE(M_FILEDESC_TO_LEADE "file desc to leader structures"); static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures"); +MALLOC_DECLARE(M_FADVISE); + static uma_zone_t file_zone; @@ -2577,6 +2579,7 @@ _fdrop(struct file *fp, struct thread *t error = fo_close(fp, td); atomic_subtract_int(&openfiles, 1); crfree(fp->f_cred); + free(fp->f_advice, M_FADVISE); uma_zfree(file_zone, fp); return (error); Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Mar 8 20:27:20 2012 (r232701) +++ head/sys/kern/vfs_syscalls.c Thu Mar 8 20:34:13 2012 (r232702) @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); #include <ufs/ufs/quota.h> -static MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); +MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE(vfs, , stat, mode, mode);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203082034.q28KYDwq063702>