libc: remove forward compat added in r356830 for F_ISUNIONSTACK

This commit is contained in:
Mateusz Guzik 2020-01-29 01:52:27 +00:00
parent f0a747d129
commit 48340ae73a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357238

View File

@ -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);
}
/*