From d1036ec04d97c478ac585f50d8d98eb1dfc87c35 Mon Sep 17 00:00:00 2001 From: trasz Date: Sun, 31 Aug 2014 21:52:26 +0000 Subject: MFC r270402: Autofs softc needs to be global anyway, so don't pass it as a local variable, and don't store in autofs_mount. Also rename it from 'sc' to 'autofs_softc', since it's global and extern. Sponsored by: The FreeBSD Foundation --- sys/fs/autofs/autofs_vnops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/fs/autofs/autofs_vnops.c') diff --git a/sys/fs/autofs/autofs_vnops.c b/sys/fs/autofs/autofs_vnops.c index 3427a62..c631f57 100644 --- a/sys/fs/autofs/autofs_vnops.c +++ b/sys/fs/autofs/autofs_vnops.c @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); static int autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, struct vnode **newvp); +extern struct autofs_softc *autofs_softc; + static int autofs_access(struct vop_access_args *ap) { @@ -134,12 +136,10 @@ autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, { struct autofs_node *anp; struct autofs_mount *amp; - struct autofs_softc *sc; int error, lock_flags; anp = vp->v_data; amp = VFSTOAUTOFS(vp->v_mount); - sc = amp->am_softc; /* * Release the vnode lock, so that other operations, in partcular @@ -151,7 +151,7 @@ autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, vref(vp); VOP_UNLOCK(vp, 0); - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); /* * XXX: Workaround for mounting the same thing multiple times; revisit. @@ -163,7 +163,7 @@ autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, error = autofs_trigger(anp, path, pathlen); mounted: - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); vn_lock(vp, lock_flags | LK_RETRY); vunref(vp); if ((vp->v_iflag & VI_DOOMED) != 0) { -- cgit v1.1