linux_file.c (174975) | linux_file.c (175202) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_file.c 174975 2007-12-29 14:28:01Z kib $"); | 30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_file.c 175202 2008-01-10 01:10:58Z attilio $"); |
31 32#include "opt_compat.h" 33#include "opt_mac.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/conf.h> 38#include <sys/dirent.h> --- 408 unchanged lines hidden (view full) --- 447 return (EINVAL); 448 } 449 450 off = fp->f_offset; 451 452 buflen = max(LINUX_DIRBLKSIZ, nbytes); 453 buflen = min(buflen, MAXBSIZE); 454 buf = malloc(buflen, M_TEMP, M_WAITOK); | 31 32#include "opt_compat.h" 33#include "opt_mac.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/conf.h> 38#include <sys/dirent.h> --- 408 unchanged lines hidden (view full) --- 447 return (EINVAL); 448 } 449 450 off = fp->f_offset; 451 452 buflen = max(LINUX_DIRBLKSIZ, nbytes); 453 buflen = min(buflen, MAXBSIZE); 454 buf = malloc(buflen, M_TEMP, M_WAITOK); |
455 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); | 455 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); |
456 457again: 458 aiov.iov_base = buf; 459 aiov.iov_len = buflen; 460 auio.uio_iov = &aiov; 461 auio.uio_iovcnt = 1; 462 auio.uio_rw = UIO_READ; 463 auio.uio_segflg = UIO_SYSSPACE; --- 890 unchanged lines hidden --- | 456 457again: 458 aiov.iov_base = buf; 459 aiov.iov_len = buflen; 460 auio.uio_iov = &aiov; 461 auio.uio_iovcnt = 1; 462 auio.uio_rw = UIO_READ; 463 auio.uio_segflg = UIO_SYSSPACE; --- 890 unchanged lines hidden --- |