From nobody Sat Apr 11 18:33:09 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AF5AC00140 for ; Mon, 8 Aug 2022 13:17:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237926AbiHHNRu (ORCPT ); Mon, 8 Aug 2022 09:17:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236127AbiHHNRp (ORCPT ); Mon, 8 Aug 2022 09:17:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A836A5FE8 for ; Mon, 8 Aug 2022 06:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659964661; 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: content-transfer-encoding:content-transfer-encoding; bh=F3isuR0jQPqF+YB0HX0DbKwI7eUCGW/G7ScBjYwrfKU=; b=YEtd8SccRz3RUn6HV5yl5KBN9kpGYRcGwyWAnhVovNSURVWw1A30r46qrjEMrSHtfeUzES vfaVC+YSgpFt939tGrPTRXivxnuZj+Z+whSknAhXSWv9EQrTHJ9/RsR3voCjofZUEUlkxU WfWtedYq63LOqVB23Lo+EMHnaTTV+qc= 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-270-2sQI0B1CMFqk3ENTj3BrcQ-1; Mon, 08 Aug 2022 09:17:37 -0400 X-MC-Unique: 2sQI0B1CMFqk3ENTj3BrcQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E19485A58C; Mon, 8 Aug 2022 13:17:37 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E1279457F; Mon, 8 Aug 2022 13:17:36 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: linux-fsdevel@vger.kernel.org cc: dhowells@redhat.com, Ian Kent , Alexander Viro , Christian Brauner , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH] uapi: Remove the inclusion of linux/mount.h from uapi/linux/fs.h MIME-Version: 1.0 Content-ID: <163409.1659964655.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Mon, 08 Aug 2022 14:17:35 +0100 Message-ID: <163410.1659964655@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Hi, We're seeing issues in autofs and xfstests whereby linux/mount.h (the UAPI version) as included indirectly by linux/fs.h is conflicting with sys/mount.h (there's a struct and an enum). Would it be possible to just remove the #include from linux/fs.h (as patch below) and rely on those hopefully few things that need mount flags that do= n't use the glibc header for them working around it by configuration? David Reported-by: Ian Kent Reviewed-by: Christian Brauner (Microsoft) --- uapi: Remove the inclusion of linux/mount.h from uapi/linux/fs.h =20 Remove the inclusion of from uapi/linux/fs.h as it interferes with definitions in sys/mount.h - but linux/fs.h is needed by various things where mount flags and structs are not. Note that this will likely have the side effect of causing some build failures. Reported-by: Ian Kent Signed-off-by: David Howells cc: Alexander Viro cc: Christian Brauner cc: linux-fsdevel@vger.kernel.org cc: linux-api@vger.kernel.org --- include/uapi/linux/fs.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index bdf7b404b3e7..7a2597ac59ed 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h @@ -17,11 +17,6 @@ #include #endif =20 -/* Use of MS_* flags within the kernel is restricted to core mount(2) code= . */ -#if !defined(__KERNEL__) -#include -#endif - /* * It's silly to have NR_OPEN bigger than NR_FILE, but you can change * the file limit at runtime and only root can increase the per-process