Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108567188
D42023.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
921 B
Referenced Files
None
Subscribers
None
D42023.diff
View Options
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1313,9 +1313,10 @@
struct vnode *rootvp;
void *bufp;
struct mount *mp;
- int error, export_error, i, len;
+ int error, export_error, i, len, fsid_up_len;
uint64_t flag;
gid_t *grps;
+ fsid_t *fsid_up;
bool vfs_suser_failed;
ASSERT_VOP_ELOCKED(vp, __func__);
@@ -1378,10 +1379,24 @@
VI_UNLOCK(vp);
VOP_UNLOCK(vp);
+ rootvp = NULL;
+
+ if (vfs_getopt(*optlist, "fsid", (void **)&fsid_up,
+ &fsid_up_len) == 0) {
+ if (fsid_up_len != sizeof(*fsid_up)) {
+ error = EINVAL;
+ goto end;
+ }
+ if (fsidcmp(&fsid_up, &mp->mnt_stat.f_fsid) != 0) {
+ error = ENOENT;
+ goto end;
+ }
+ vfs_deleteopt(*optlist, "fsid");
+ }
+
vfs_op_enter(mp);
vn_seqc_write_begin(vp);
- rootvp = NULL;
MNT_ILOCK(mp);
if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) {
MNT_IUNLOCK(mp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 10:35 AM (4 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16194336
Default Alt Text
D42023.diff (921 B)
Attached To
Mode
D42023: Ensure that automount(8) flushes autofs by checking fsid
Attached
Detach File
Event Timeline
Log In to Comment