Deleted Added
full compact
vfs_aio.c (36848) vfs_aio.c (37389)
1/*
2 * Copyright (c) 1997 John S. Dyson. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. John S. Dyson's name may not be used to endorse or promote products
10 * derived from this software without specific prior written permission.
11 *
12 * DISCLAIMER: This code isn't warranted to do anything useful. Anything
13 * bad that happens because of using this software isn't the responsibility
14 * of the author. This software is distributed AS-IS.
15 *
1/*
2 * Copyright (c) 1997 John S. Dyson. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. John S. Dyson's name may not be used to endorse or promote products
10 * derived from this software without specific prior written permission.
11 *
12 * DISCLAIMER: This code isn't warranted to do anything useful. Anything
13 * bad that happens because of using this software isn't the responsibility
14 * of the author. This software is distributed AS-IS.
15 *
16 * $Id: vfs_aio.c,v 1.28 1998/04/17 22:36:50 des Exp $
16 * $Id: vfs_aio.c,v 1.29 1998/06/10 10:31:08 dfr Exp $
17 */
18
19/*
20 * This file contains support for the POSIX 1003.1B AIO/LIO facility.
21 */
22
23#include <sys/param.h>
24#include <sys/systm.h>

--- 943 unchanged lines hidden (view full) ---

968 int fd;
969 int majordev;
970 int s;
971 int cnt;
972 dev_t dev;
973 int rw;
974 d_strategy_t *fstrategy;
975 struct cdevsw *cdev;
17 */
18
19/*
20 * This file contains support for the POSIX 1003.1B AIO/LIO facility.
21 */
22
23#include <sys/param.h>
24#include <sys/systm.h>

--- 943 unchanged lines hidden (view full) ---

968 int fd;
969 int majordev;
970 int s;
971 int cnt;
972 dev_t dev;
973 int rw;
974 d_strategy_t *fstrategy;
975 struct cdevsw *cdev;
976 struct bdevsw *bdev;
976 struct cdevsw *bdev;
977
978 cb = &aiocbe->uaiocb;
979 fdp = p->p_fd;
980 fd = cb->aio_fildes;
981 fp = fdp->fd_ofiles[fd];
982
983 if (fp->f_type != DTYPE_VNODE) {
984 return -1;

--- 16 unchanged lines hidden (view full) ---

1001 if (majordev == NODEV) {
1002 return -1;
1003 }
1004
1005 cdev = cdevsw[major(vp->v_rdev)];
1006 if (cdev == NULL) {
1007 return -1;
1008 }
977
978 cb = &aiocbe->uaiocb;
979 fdp = p->p_fd;
980 fd = cb->aio_fildes;
981 fp = fdp->fd_ofiles[fd];
982
983 if (fp->f_type != DTYPE_VNODE) {
984 return -1;

--- 16 unchanged lines hidden (view full) ---

1001 if (majordev == NODEV) {
1002 return -1;
1003 }
1004
1005 cdev = cdevsw[major(vp->v_rdev)];
1006 if (cdev == NULL) {
1007 return -1;
1008 }
1009 bdev = cdev->d_bdev;
1010 if (bdev == NULL) {
1009
1010 if (cdev->d_bmaj == -1) {
1011 return -1;
1012 }
1011 return -1;
1012 }
1013 bdev = cdev;
1013
1014 ki = p->p_aioinfo;
1015 if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) {
1016 return -1;
1017 }
1018
1019 cnt = cb->aio_nbytes;
1020 if (cnt > MAXPHYS) {

--- 1030 unchanged lines hidden ---
1014
1015 ki = p->p_aioinfo;
1016 if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) {
1017 return -1;
1018 }
1019
1020 cnt = cb->aio_nbytes;
1021 if (cnt > MAXPHYS) {

--- 1030 unchanged lines hidden ---