Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177553989
D58626.1794703841.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D58626.1794703841.diff
View Options
diff --git a/sys/fs/autofs/autofs_vnops.c b/sys/fs/autofs/autofs_vnops.c
--- a/sys/fs/autofs/autofs_vnops.c
+++ b/sys/fs/autofs/autofs_vnops.c
@@ -136,16 +136,22 @@
struct vnode **newvp)
{
struct autofs_node *anp;
+ struct mount *mp;
int error, lock_flags;
anp = vp->v_data;
/*
- * Release the vnode lock, so that other operations, in partcular
- * mounting a filesystem on top of it, can proceed. Increase use
- * count, to prevent the vnode from being deallocated and to prevent
- * filesystem from being unmounted.
+ * Release the vnode lock, so that other operations, in
+ * particular mounting a filesystem on top of it, can proceed.
+ * Increase use count and busy the mount, to prevent the vnode
+ * from being deallocated and to prevent filesystem from being
+ * unmounted.
*/
+ mp = vp->v_mount;
+ error = vfs_busy(mp, MBF_NOWAIT);
+ if (error != 0)
+ return (error);
lock_flags = VOP_ISLOCKED(vp);
vref(vp);
VOP_UNLOCK(vp);
@@ -165,6 +171,7 @@
sx_xunlock(&autofs_softc->sc_lock);
vn_lock(vp, lock_flags | LK_RETRY);
vunref(vp);
+ vfs_unbusy(mp);
if (VN_IS_DOOMED(vp)) {
AUTOFS_DEBUG("VIRF_DOOMED");
return (ENOENT);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 12:50 AM (6 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41734890
Default Alt Text
D58626.1794703841.diff (1 KB)
Attached To
Mode
D58626: autofs_lookup(): busy the mount point around autofs_trigger()
Attached
Detach File
Event Timeline