FreeBSD/sys/kern/vfs_vnops.c
/*
 * Decode vn_io_fault_args and perform the corresponding i/o.
 */
Decode vn_io_fault_args and perform the corresponding i/o.
Decode vn_io_fault_args and perform the corresponding i / o .
static int
vn_io_fault_doio(struct vn_io_fault_args *args, struct uio *uio,
    struct thread *td)
{
	switch (args->kind) {
	case VN_IO_FAULT_FOP:
		return ((args->args.fop_args.doio)(args->args.fop_args.fp,
		    uio, args->cred, args->flags, td));
	case VN_IO_FAULT_VOP:
		if (uio->uio_rw == UIO_READ) {
			return (VOP_READ(args->args.vop_args.vp, uio,
			    args->flags, args->cred));
		} else if (uio->uio_rw == UIO_WRITE) {
			return (VOP_WRITE(args->args.vop_args.vp, uio,
			    args->flags, args->cred));
		}
		break;
	}
	panic("vn_io_fault_doio: unknown kind of io %d %d", args->kind,
	    uio->uio_rw);
}
static int vn_io_fault_doio ( struct vn_io_fault_args * args , struct uio * uio , struct thread * td ) { switch ( args -> kind ) { case VN_IO_FAULT_FOP : return ( ( args -> args . fop_args . doio ) ( args -> args . fop_args . fp , uio , args -> cred , args -> flags , td ) ) ; case VN_IO_FAULT_VOP : if ( uio -> uio_rw == UIO_READ ) { return ( VOP_READ ( args -> args . vop_args . vp , uio , args -> flags , args -> cred ) ) ; } else if ( uio -> uio_rw == UIO_WRITE ) { return ( VOP_WRITE ( args -> args . vop_args . vp , uio , args -> flags , args -> cred ) ) ; } break ; } panic ( " " , args -> kind , uio -> uio_rw ) ; }
Decode vn_io_fault_args and perform the corresponding i/o.
Decode vn_io_fault_args and perform the corresponding i / o .