flock currently does not work on named pipes. vop_advlock handles both flock and the weird granular F_SETLK stuff — I guess the latter does not make sense for pipes, which is why vop_advlock has been disabled on fifos since forever. But flock makes sense and some software does it on Linux.
kern_fcntl has its own (fp->f_type != DTYPE_VNODE) check on F_SETLK/F_GETLK, so I thiiiink I'm not enabling too much?? I can't think of a way to get to the vop_advlock with non-flock args through a different syscall..