diff options
author | trasz <trasz@FreeBSD.org> | 2014-08-31 21:52:26 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-08-31 21:52:26 +0000 |
commit | d1036ec04d97c478ac585f50d8d98eb1dfc87c35 (patch) | |
tree | 97b9021d2612250ea283c63dde6541cd516d9709 /sys/fs/autofs/autofs_vnops.c | |
parent | 2ded039a6da22e85917388ed0b611e4858d05a72 (diff) | |
download | FreeBSD-src-d1036ec04d97c478ac585f50d8d98eb1dfc87c35.zip FreeBSD-src-d1036ec04d97c478ac585f50d8d98eb1dfc87c35.tar.gz |
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
Diffstat (limited to 'sys/fs/autofs/autofs_vnops.c')
-rw-r--r-- | sys/fs/autofs/autofs_vnops.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) { |