Deleted Added
full compact
dead_vnops.c (139776) dead_vnops.c (140165)
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. 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 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. 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 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/fs/deadfs/dead_vnops.c 139776 2005-01-06 18:10:42Z imp $
30 * $FreeBSD: head/sys/fs/deadfs/dead_vnops.c 140165 2005-01-13 07:53:01Z phk $
31 */
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/lock.h>
37#include <sys/mutex.h>
38#include <sys/poll.h>

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

171 struct ucred *a_cred;
172 struct proc *a_p;
173 } */ *ap;
174{
175
176 if (!chkvnlock(ap->a_vp))
177 return (ENOTTY);
178 /* XXX: Doesn't this just recurse back here ? */
31 */
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/lock.h>
37#include <sys/mutex.h>
38#include <sys/poll.h>

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

171 struct ucred *a_cred;
172 struct proc *a_p;
173 } */ *ap;
174{
175
176 if (!chkvnlock(ap->a_vp))
177 return (ENOTTY);
178 /* XXX: Doesn't this just recurse back here ? */
179 return (VCALL(ap->a_vp, VOFFSET(vop_ioctl), ap));
179 return (VOP_IOCTL_AP(ap));
180}
181
182
183/*
184 * Wait until the vnode has finished changing state.
185 */
186static int
187dead_lock(ap)

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

198 * the interlock here.
199 */
200 if (ap->a_flags & LK_INTERLOCK) {
201 mtx_unlock(&vp->v_interlock);
202 ap->a_flags &= ~LK_INTERLOCK;
203 }
204 if (!chkvnlock(vp))
205 return (0);
180}
181
182
183/*
184 * Wait until the vnode has finished changing state.
185 */
186static int
187dead_lock(ap)

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

198 * the interlock here.
199 */
200 if (ap->a_flags & LK_INTERLOCK) {
201 mtx_unlock(&vp->v_interlock);
202 ap->a_flags &= ~LK_INTERLOCK;
203 }
204 if (!chkvnlock(vp))
205 return (0);
206 return (VCALL(vp, VOFFSET(vop_lock), ap));
206 return (VOP_LOCK_AP(ap));
207}
208
209/*
210 * Wait until the vnode has finished changing state.
211 */
212static int
213dead_bmap(ap)
214 struct vop_bmap_args /* {

--- 45 unchanged lines hidden ---
207}
208
209/*
210 * Wait until the vnode has finished changing state.
211 */
212static int
213dead_bmap(ap)
214 struct vop_bmap_args /* {

--- 45 unchanged lines hidden ---