* Remove get_mplock/rel_mplock calls in tmpfs which are no longer needed.
This will improve the write path a bit though we still utilize the
per-mount token in most places.
Reported-by: Venkatesh Srinivas <me@endeavour.zapto.org>
#include <sys/vfsops.h>
#include <sys/vnode.h>
-#include <sys/mplock2.h>
-
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
*/
extended = ((uio->uio_offset + uio->uio_resid) > node->tn_size);
- get_mplock();
-
while (uio->uio_resid > 0) {
/*
* Use buffer cache I/O (via tmpfs_strategy)
}
}
- rel_mplock();
-
if (error) {
if (extended) {
(void)tmpfs_reg_resize(vp, oldsize, trivial);
* Handle possible MP race interlock on filter check/write
*/
if (kn->kn_data == 0) {
- get_mplock();
kn->kn_data = (off < INTPTR_MAX) ? off : INTPTR_MAX;
- rel_mplock();
}
return (kn->kn_data != 0);
}