summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-01-29 01:52:27 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-01-29 01:52:27 +0000
commit48340ae73a79945df8dcb76f9f34191a1320d525 (patch)
tree09508329b67fd60f2e0d0ed4ab773d2fe1077346
parentf0a747d129685b618ee89c973d4fe625c1cd291f (diff)
Notes
-rw-r--r--lib/libc/gen/opendir.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c
index 0eefaf546c310..c294081847e24 100644
--- a/lib/libc/gen/opendir.c
+++ b/lib/libc/gen/opendir.c
@@ -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);
}
/*