{
/* st_dev and associated info for the most recently processed device
for which file_has_aclinfo failed indicating lack of support. */
+ static bool unsupported_cached /* = false */;
static int unsupported_return;
static char *unsupported_scontext;
static int unsupported_scontext_err;
static dev_t unsupported_device;
- if (f->stat_ok && f->stat.st_dev == unsupported_device)
+ if (f->stat_ok && unsupported_cached && f->stat.st_dev == unsupported_device)
{
ai->buf = ai->u.__gl_acl_ch;
ai->size = 0;
if (f->stat_ok && n <= 0 && !acl_errno_valid (err)
&& (!(flags & ACL_GET_SCONTEXT) || !acl_errno_valid (ai->scontext_err)))
{
+ unsupported_cached = true;
unsupported_return = n;
unsupported_scontext = ai->scontext;
unsupported_scontext_err = ai->scontext_err;