fdesc_vnops.c (255219) | fdesc_vnops.c (255240) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software donated to Berkeley by 6 * Jan-Simon Pendry. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 33 * | 1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software donated to Berkeley by 6 * Jan-Simon Pendry. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 33 * |
34 * $FreeBSD: head/sys/fs/fdescfs/fdesc_vnops.c 255219 2013-09-05 00:09:56Z pjd $ | 34 * $FreeBSD: head/sys/fs/fdescfs/fdesc_vnops.c 255240 2013-09-05 11:58:12Z pjd $ |
35 */ 36 37/* 38 * /dev/fd Filesystem 39 */ 40 41#include <sys/param.h> 42#include <sys/systm.h> --- 261 unchanged lines hidden (view full) --- 304 goto bad; 305 } 306 fd = fd1; 307 } 308 309 /* 310 * No rights to check since 'fp' isn't actually used. 311 */ | 35 */ 36 37/* 38 * /dev/fd Filesystem 39 */ 40 41#include <sys/param.h> 42#include <sys/systm.h> --- 261 unchanged lines hidden (view full) --- 304 goto bad; 305 } 306 fd = fd1; 307 } 308 309 /* 310 * No rights to check since 'fp' isn't actually used. 311 */ |
312 if ((error = fget(td, fd, 0, &fp)) != 0) | 312 if ((error = fget(td, fd, NULL, &fp)) != 0) |
313 goto bad; 314 315 /* Check if we're looking up ourselves. */ 316 if (VTOFDESC(dvp)->fd_ix == FD_DESC + fd) { 317 /* 318 * In case we're holding the last reference to the file, the dvp 319 * will be re-acquired. 320 */ --- 262 unchanged lines hidden --- | 313 goto bad; 314 315 /* Check if we're looking up ourselves. */ 316 if (VTOFDESC(dvp)->fd_ix == FD_DESC + fd) { 317 /* 318 * In case we're holding the last reference to the file, the dvp 319 * will be re-acquired. 320 */ --- 262 unchanged lines hidden --- |