fd: stop passing M_ZERO to uma_zalloc
The optimisation seen with malloc cannot be used here as zone sizes are now known at compilation. Thus bzero by hand to get the optimisation instead.
This commit is contained in:
parent
efb6d4a479
commit
bcbc8d35eb
@ -1865,7 +1865,8 @@ falloc_noinstall(struct thread *td, struct file **resultfp)
|
||||
}
|
||||
return (ENFILE);
|
||||
}
|
||||
fp = uma_zalloc(file_zone, M_WAITOK | M_ZERO);
|
||||
fp = uma_zalloc(file_zone, M_WAITOK);
|
||||
bzero(fp, sizeof(*fp));
|
||||
refcount_init(&fp->f_count, 1);
|
||||
fp->f_cred = crhold(td->td_ucred);
|
||||
fp->f_ops = &badfileops;
|
||||
|
Loading…
Reference in New Issue
Block a user