Date: Tue, 24 Apr 2012 20:27:31 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r234661 - stable/8/sys/kern Message-ID: <201204242027.q3OKRVih063736@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Tue Apr 24 20:27:31 2012 New Revision: 234661 URL: http://svn.freebsd.org/changeset/base/234661 Log: MFC: r232702 Free up allocated memory used by posix_fadvise(2). Modified: stable/8/sys/kern/kern_descrip.c stable/8/sys/kern/vfs_syscalls.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/kern_descrip.c ============================================================================== --- stable/8/sys/kern/kern_descrip.c Tue Apr 24 19:08:40 2012 (r234660) +++ stable/8/sys/kern/kern_descrip.c Tue Apr 24 20:27:31 2012 (r234661) @@ -91,6 +91,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; @@ -2361,6 +2363,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: stable/8/sys/kern/vfs_syscalls.c ============================================================================== --- stable/8/sys/kern/vfs_syscalls.c Tue Apr 24 19:08:40 2012 (r234660) +++ stable/8/sys/kern/vfs_syscalls.c Tue Apr 24 20:27:31 2012 (r234661) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_page.h> #include <vm/uma.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?201204242027.q3OKRVih063736>