Page MenuHomeFreeBSD

D59910.1794711549.diff
No OneTemporary

Authored By
Unknown
Size
1022 B
Referenced Files
None
Subscribers
None

D59910.1794711549.diff

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -2570,6 +2570,8 @@
}
error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED);
NDFREE_PNBUF(&nd);
+ if (error == 0 && (nd.ni_vp->v_vflag & VV_ROOT) != 0)
+ sbp->st_bsdflags |= SFBSD_MNTPOINT;
vput(nd.ni_vp);
#ifdef __STAT_TIME_T_EXT
sbp->st_atim_ext = 0;
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1838,6 +1838,8 @@
vn_lock(vp, LK_SHARED | LK_RETRY);
error = VOP_STAT(vp, sb, active_cred, fp->f_cred);
+ if (error == 0 && (vp->v_vflag & VV_ROOT) != 0)
+ sb->st_bsdflags |= SFBSD_MNTPOINT;
VOP_UNLOCK(vp);
return (error);
diff --git a/sys/sys/stat.h b/sys/sys/stat.h
--- a/sys/sys/stat.h
+++ b/sys/sys/stat.h
@@ -343,6 +343,7 @@
/* st_bsdflags */
#define SFBSD_NAMEDATTR 0x0001 /* file is named attribute or dir */
+#define SFBSD_MNTPOINT 0x0002 /* file is a mount point */
#ifdef _KERNEL
/*

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 15, 2:59 AM (10 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41736607
Default Alt Text
D59910.1794711549.diff (1022 B)

Event Timeline