Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174266239
D58626.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58626.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
Fri, Oct 2, 8:58 PM (9 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36053087
Default Alt Text
D58626.diff (1 KB)
Attached To
Mode
D58626: autofs_lookup(): busy the mount point around autofs_trigger()
Attached
Detach File
Event Timeline
Log In to Comment