From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id EAA403858D39 for ; Mon, 19 Sep 2022 08:30:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EAA403858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663576234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BNKwWkYxVhu1wqzHgfZtfTdhJbqRFJ8r+MdDlnz91xo=; b=hH3uP5Qf7yEKIgoa1M/6vCDgSk3nJmKxZJhuVgRenecCz0/P49WQ015FTxkZKzTlaXiwRm qHSxN+uuQ4vMx1XsyCspKmP6SNcd8sSMv39mNwgBjb8Uruj0lO5wNt/pO0Bm1+trgaZYx8 3WInovZKDiLBMK+iQcfyzj7J0ZbcrFg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-9-WJ3fN_chMOilTcWNJ0iXgw-1; Mon, 19 Sep 2022 04:30:33 -0400 X-MC-Unique: WJ3fN_chMOilTcWNJ0iXgw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 262E685A583; Mon, 19 Sep 2022 08:30:33 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 394E640C2064; Mon, 19 Sep 2022 08:30:31 +0000 (UTC) From: Florian Weimer To: Andreas Schwab Cc: Florian Weimer via Libc-alpha Subject: Re: [PATCH] Linux: Do not skip d_ino == 0 entries in readdir, readdir64 (bug 12165) References: <87o7vbj1kz.fsf@oldenburg.str.redhat.com> Date: Mon, 19 Sep 2022 10:30:29 +0200 In-Reply-To: (Andreas Schwab's message of "Mon, 19 Sep 2022 10:26:22 +0200") Message-ID: <87r107hil6.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Andreas Schwab: > On Sep 19 2022, Florian Weimer via Libc-alpha wrote: > >> - if (bytes <= 0) >> - { >> - /* On some systems getdents fails with ENOENT when the > > Shouldn't that be "some file systems"? > >> - open directory has been rmdir'd already. POSIX.1 >> - requires that we treat this condition like normal EOF. */ >> - if (bytes < 0 && errno == ENOENT) >> - bytes = 0; >> - >> - /* Don't modifiy errno when reaching EOF. */ >> - if (bytes == 0) >> - __set_errno (saved_errno); >> - dp = NULL; >> - break; >> - } >> - dirp->size = (size_t) bytes; >> - >> - /* Reset the offset into the buffer. */ >> - dirp->offset = 0; >> + /* Linux fails with ENOENT if IS_DEADDIR is true for the > > What is IS_DEADDIR? It's an internal Linux construct. Isn't this clear from the context? Thanks, Florian