Free up allocated memory used by posix_fadvise(2).
This commit is contained in:
parent
b47f624183
commit
ffae9d4d7c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232702
@ -104,6 +104,8 @@ static MALLOC_DEFINE(M_FILEDESC_TO_LEADER, "filedesc_to_leader",
|
||||
"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 *td)
|
||||
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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user