Deleted Added
full compact
vm_mmap.c (89306) vm_mmap.c (89319)
1/*
2 * Copyright (c) 1988 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

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

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 * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$
39 *
40 * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
1/*
2 * Copyright (c) 1988 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

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

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 * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$
39 *
40 * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
41 * $FreeBSD: head/sys/vm/vm_mmap.c 89306 2002-01-13 11:58:06Z alfred $
41 * $FreeBSD: head/sys/vm/vm_mmap.c 89319 2002-01-14 00:13:45Z alfred $
42 */
43
44/*
45 * Mapped file (mmap) interface to VM
46 */
47
48#include "opt_bleed.h"
49#include "opt_compat.h"

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

287 maxprot = VM_PROT_ALL;
288 pos = 0;
289 } else {
290 /*
291 * Mapping file, get fp for validation. Obtain vnode and make
292 * sure it is of appropriate type.
293 * don't let the descriptor disappear on us if we block
294 */
42 */
43
44/*
45 * Mapped file (mmap) interface to VM
46 */
47
48#include "opt_bleed.h"
49#include "opt_compat.h"

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

287 maxprot = VM_PROT_ALL;
288 pos = 0;
289 } else {
290 /*
291 * Mapping file, get fp for validation. Obtain vnode and make
292 * sure it is of appropriate type.
293 * don't let the descriptor disappear on us if we block
294 */
295 fp = ffind_hold(td, uap->fd);
296 if (fp == NULL) {
297 error = EBADF;
295 if ((error = fget(td, uap->fd, &fp)) != 0)
298 goto done;
296 goto done;
299 }
300 if (fp->f_type != DTYPE_VNODE) {
301 error = EINVAL;
302 goto done;
303 }
304
305 /*
306 * POSIX shared-memory objects are defined to have
307 * kernel persistence, and are not defined to support

--- 974 unchanged lines hidden ---
297 if (fp->f_type != DTYPE_VNODE) {
298 error = EINVAL;
299 goto done;
300 }
301
302 /*
303 * POSIX shared-memory objects are defined to have
304 * kernel persistence, and are not defined to support

--- 974 unchanged lines hidden ---