Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2017 09:38:42 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r325098 - in stable/11/sys: kern sys
Message-ID:  <201710290938.v9T9cg0U076750@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Oct 29 09:38:42 2017
New Revision: 325098
URL: https://svnweb.freebsd.org/changeset/base/325098

Log:
  MFC r324853:
  Remove the support for mknod(S_IFMT), which created dummy vnodes with
  VBAD type.

Modified:
  stable/11/sys/kern/vfs_syscalls.c
  stable/11/sys/sys/priv.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/11/sys/kern/vfs_syscalls.c	Sun Oct 29 08:25:31 2017	(r325097)
+++ stable/11/sys/kern/vfs_syscalls.c	Sun Oct 29 09:38:42 2017	(r325098)
@@ -1187,9 +1187,6 @@ kern_mknodat(struct thread *td, int fd, char *path, en
 		if (error == 0 && dev == VNOVAL)
 			error = EINVAL;
 		break;
-	case S_IFMT:
-		error = priv_check(td, PRIV_VFS_MKNOD_BAD);
-		break;
 	case S_IFWHT:
 		error = priv_check(td, PRIV_VFS_MKNOD_WHT);
 		break;
@@ -1227,9 +1224,6 @@ restart:
 		whiteout = 0;
 
 		switch (mode & S_IFMT) {
-		case S_IFMT:	/* used by badsect to flag bad sectors */
-			vattr.va_type = VBAD;
-			break;
 		case S_IFCHR:
 			vattr.va_type = VCHR;
 			break;

Modified: stable/11/sys/sys/priv.h
==============================================================================
--- stable/11/sys/sys/priv.h	Sun Oct 29 08:25:31 2017	(r325097)
+++ stable/11/sys/sys/priv.h	Sun Oct 29 09:38:42 2017	(r325098)
@@ -266,7 +266,7 @@
 #define	PRIV_VFS_GETFH		327	/* Can retrieve file handles. */
 #define	PRIV_VFS_GETQUOTA	328	/* getquota(). */
 #define	PRIV_VFS_LINK		329	/* bsd.hardlink_check_uid */
-#define	PRIV_VFS_MKNOD_BAD	330	/* Can mknod() to mark bad inodes. */
+#define	PRIV_VFS_MKNOD_BAD	330	/* Was: mknod() can mark bad inodes. */
 #define	PRIV_VFS_MKNOD_DEV	331	/* Can mknod() to create dev nodes. */
 #define	PRIV_VFS_MKNOD_WHT	332	/* Can mknod() to create whiteout. */
 #define	PRIV_VFS_MOUNT		333	/* Can mount(). */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710290938.v9T9cg0U076750>