vfs_vnops.c (30783) | vfs_vnops.c (31016) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94 |
39 * $Id: vfs_vnops.c,v 1.39 1997/10/06 02:38:27 dyson Exp $ | 39 * $Id: vfs_vnops.c,v 1.40 1997/10/27 15:26:23 bde Exp $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/fcntl.h> 45#include <sys/file.h> 46#include <sys/stat.h> 47#include <sys/proc.h> --- 219 unchanged lines hidden (view full) --- 267vn_read(fp, uio, cred) 268 struct file *fp; 269 struct uio *uio; 270 struct ucred *cred; 271{ 272 struct vnode *vp = (struct vnode *)fp->f_data; 273 struct proc *p = uio->uio_procp; 274 int count, error; | 40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/fcntl.h> 45#include <sys/file.h> 46#include <sys/stat.h> 47#include <sys/proc.h> --- 219 unchanged lines hidden (view full) --- 267vn_read(fp, uio, cred) 268 struct file *fp; 269 struct uio *uio; 270 struct ucred *cred; 271{ 272 struct vnode *vp = (struct vnode *)fp->f_data; 273 struct proc *p = uio->uio_procp; 274 int count, error; |
275 int flag, seq; | 275 int flag; |
276 277 VOP_LEASE(vp, p, cred, LEASE_READ); 278 vn_lock(vp, LK_SHARED | LK_NOPAUSE | LK_RETRY, p); 279 uio->uio_offset = fp->f_offset; 280 count = uio->uio_resid; 281 flag = 0; 282 if (fp->f_flag & FNONBLOCK) 283 flag |= IO_NDELAY; --- 251 unchanged lines hidden --- | 276 277 VOP_LEASE(vp, p, cred, LEASE_READ); 278 vn_lock(vp, LK_SHARED | LK_NOPAUSE | LK_RETRY, p); 279 uio->uio_offset = fp->f_offset; 280 count = uio->uio_resid; 281 flag = 0; 282 if (fp->f_flag & FNONBLOCK) 283 flag |= IO_NDELAY; --- 251 unchanged lines hidden --- |