Page MenuHomeFreeBSD

D42023.diff
No OneTemporary

D42023.diff

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

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)

Event Timeline