tmpfs - Fix write-append/mmap-read race
* tmpfs_write() was not extending the target file atomically with the
write via a file node lock. Although the vnode is locked exclusively,
this only prevents read() and write() related races. lseek() and memory
mapped reads could still race.
* Adjust the NODE LOCK to cover the entire tmpfs_write() operation. This
fixes races against lseek() or stat() which would otherwise allow the
new post-append file size to be returned before the write completes.
-Matt
Reported-by: Ben Woolley <tautolog@gmail.com>