Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 2020 01:52:27 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r357238 - head/lib/libc/gen
Message-ID:  <202001290152.00T1qRfT090235@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Wed Jan 29 01:52:27 2020
New Revision: 357238
URL: https://svnweb.freebsd.org/changeset/base/357238

Log:
  libc: remove forward compat added in r356830 for F_ISUNIONSTACK

Modified:
  head/lib/libc/gen/opendir.c

Modified: head/lib/libc/gen/opendir.c
==============================================================================
--- head/lib/libc/gen/opendir.c	Wed Jan 29 01:51:21 2020	(r357237)
+++ head/lib/libc/gen/opendir.c	Wed Jan 29 01:52:27 2020	(r357238)
@@ -35,8 +35,6 @@ __FBSDID("$FreeBSD$");
 
 #include "namespace.h"
 #include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
 
 #include <dirent.h>
 #include <errno.h>
@@ -276,7 +274,6 @@ _filldir(DIR *dirp, bool use_current_pos)
 static bool
 is_unionstack(int fd)
 {
-	struct statfs sfb;
 	int unionstack;
 
 	unionstack = _fcntl(fd, F_ISUNIONSTACK, 0);
@@ -284,12 +281,10 @@ is_unionstack(int fd)
 		return (unionstack);
 
 	/*
-	 * Temporary compat for kernels which don't provide F_ISUNIONSTACK.
+	 * Should not happen unless running on a kernel without the op,
+	 * but no use rendering the system useless in such a case.
 	 */
-	if (_fstatfs(fd, &sfb) < 0)
-		return (true);
-	return (strcmp(sfb.f_fstypename, "unionfs") == 0 ||
-	    (sfb.f_flags & MNT_UNION));
+	return (0);
 }
 
 /*



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