diff options
author | des <des@FreeBSD.org> | 2007-03-31 23:57:17 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2007-03-31 23:57:17 +0000 |
commit | b0b258dcad8e2fefcf53d7274cbe03b227d1a7f8 (patch) | |
tree | 458fffab992364449001618509cc70837224c553 /sys | |
parent | b0b93a3c55b874a04a163db8dcf6af0b7e28b2e4 (diff) | |
download | FreeBSD-src-b0b258dcad8e2fefcf53d7274cbe03b227d1a7f8.zip FreeBSD-src-b0b258dcad8e2fefcf53d7274cbe03b227d1a7f8.tar.gz |
Make vdropl() public; zfs needs it. There is also plenty of existing
file system code (mostly *_reclaim()) which look like this:
VOP_LOCK(vp);
/* examine vp */
VOP_UNLOCK(vp);
vdrop(vp);
This can now be rewritten to:
VOP_LOCK(vp);
/* examine vp */
vdropl(vp); /* will unlock vp */
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_subr.c | 3 | ||||
-rw-r--r-- | sys/sys/vnode.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index bad9828..d38f583 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -95,7 +95,6 @@ static int flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo, static void syncer_shutdown(void *arg, int howto); static int vtryrecycle(struct vnode *vp); static void vbusy(struct vnode *vp); -static void vdropl(struct vnode *vp); static void vinactive(struct vnode *, struct thread *); static void v_incr_usecount(struct vnode *); static void v_decr_usecount(struct vnode *); @@ -2214,7 +2213,7 @@ vdrop(struct vnode *vp) * the vnode we will free it if it has been vgone'd otherwise it is * placed on the free list. */ -static void +void vdropl(struct vnode *vp) { diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index da47a50..ea9708b 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -591,6 +591,7 @@ int vaccess_acl_posix1e(enum vtype type, uid_t file_uid, void vattr_null(struct vattr *vap); int vcount(struct vnode *vp); void vdrop(struct vnode *); +void vdropl(struct vnode *); void vfs_add_vnodeops(const void *); void vfs_rm_vnodeops(const void *); int vflush(struct mount *mp, int rootrefs, int flags, struct thread *td); |