Deleted Added
full compact
vfs_default.c (30496) vfs_default.c (30513)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed
6 * to Berkeley by John Heidemann of the UCLA Ficus project.
7 *
8 * Source: * @(#)i405_init.c 2.10 92/04/27 UCLA Ficus project

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

167 case _PC_VDISABLE:
168 *ap->a_retval = _POSIX_VDISABLE;
169 return (0);
170 default:
171 return (EINVAL);
172 }
173 /* NOTREACHED */
174}
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed
6 * to Berkeley by John Heidemann of the UCLA Ficus project.
7 *
8 * Source: * @(#)i405_init.c 2.10 92/04/27 UCLA Ficus project

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

167 case _PC_VDISABLE:
168 *ap->a_retval = _POSIX_VDISABLE;
169 return (0);
170 default:
171 return (EINVAL);
172 }
173 /* NOTREACHED */
174}
175
176/*
177 * Standard lock, unlock and islocked functions.
178 *
179 * These depend on the lock structure being the first element in the
180 * inode, ie: vp->v_data points to the the lock!
181 */
182int
183vop_stdlock(ap)
184 struct vop_lock_args /* {
185 struct vnode *a_vp;
186 int a_flags;
187 struct proc *a_p;
188 } */ *ap;
189{
190 struct lock *l = (struct lock*)ap->a_vp->v_data;
191
192 return (lockmgr(l, ap->a_flags, &ap->a_vp->v_interlock, ap->a_p));
193}
194
195int
196vop_stdunlock(ap)
197 struct vop_unlock_args /* {
198 struct vnode *a_vp;
199 int a_flags;
200 struct proc *a_p;
201 } */ *ap;
202{
203 struct lock *l = (struct lock*)ap->a_vp->v_data;
204
205 return (lockmgr(l, ap->a_flags | LK_RELEASE, &ap->a_vp->v_interlock,
206 ap->a_p));
207}
208
209int
210vop_stdislocked(ap)
211 struct vop_islocked_args /* {
212 struct vnode *a_vp;
213 } */ *ap;
214{
215 struct lock *l = (struct lock*)ap->a_vp->v_data;
216
217 return (lockstatus(l));
218}
219