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); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"