diff options
author | kmacy <kmacy@FreeBSD.org> | 2006-11-13 05:51:22 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2006-11-13 05:51:22 +0000 |
commit | 0c00ea16dbadcde1937dfc2bef577820b762e95a (patch) | |
tree | c2c7577af1d9350da736e5ba02f23f6df8c9f273 /sys/sys | |
parent | c07fe38e024b8eb9ed43c77f898e85cf8c488928 (diff) | |
download | FreeBSD-src-0c00ea16dbadcde1937dfc2bef577820b762e95a.zip FreeBSD-src-0c00ea16dbadcde1937dfc2bef577820b762e95a.tar.gz |
change vop_lock handling to allowing tracking of callers' file and line for
acquisition of lockmgr locks
Approved by: scottl (standing in for mentor rwatson)
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/vnode.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 2bd0971..d877ab9 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -606,7 +606,8 @@ int vn_close(struct vnode *vp, void vn_finished_write(struct mount *mp); void vn_finished_secondary_write(struct mount *mp); int vn_isdisk(struct vnode *vp, int *errp); -int vn_lock(struct vnode *vp, int flags, struct thread *td); +int _vn_lock(struct vnode *vp, int flags, struct thread *td, char *file, int line); +#define vn_lock(vp, flags, td) _vn_lock(vp, flags, td, __FILE__, __LINE__) int vn_open(struct nameidata *ndp, int *flagp, int cmode, int fdidx); int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, struct ucred *cred, int fdidx); @@ -644,7 +645,7 @@ int vop_stdgetpages(struct vop_getpages_args *); int vop_stdinactive(struct vop_inactive_args *); int vop_stdislocked(struct vop_islocked_args *); int vop_stdkqfilter(struct vop_kqfilter_args *); -int vop_stdlock(struct vop_lock_args *); +int vop_stdlock(struct _vop_lock_args *); int vop_stdputpages(struct vop_putpages_args *); int vop_stdunlock(struct vop_unlock_args *); int vop_nopoll(struct vop_poll_args *); @@ -697,6 +698,9 @@ void vop_unlock_pre(void *a); | (noffset > osize ? NOTE_EXTEND : 0)); \ } +#define VOP_LOCK(vp, flags, td) _VOP_LOCK(vp, flags, td, __FILE__, __LINE__) + + void vput(struct vnode *vp); void vrele(struct vnode *vp); void vref(struct vnode *vp); |