Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11646469rwl; Tue, 3 Jan 2023 02:33:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXv/fI7hRo4UIH388BWWOZtgMEY9QO9reBsJ5yoU0H5po5/MUODJ0NWDtDWFJc9AyUV/NcI3 X-Received: by 2002:a17:906:3a93:b0:7c0:f7b0:9aed with SMTP id y19-20020a1709063a9300b007c0f7b09aedmr35667725ejd.55.1672741991650; Tue, 03 Jan 2023 02:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672741991; cv=none; d=google.com; s=arc-20160816; b=Pudeb99qBQD/E5b/4A8qQZDnKmmLJphP7DAE1DxuKMfhDYTzbZ+Iq39fX5DUEktRTG unVUzOZSafg5D2RFcwKqQH8MnD7jwFRjyr3kLobJRRS/USxgda6ptmoNL4F676AkSxQY 08PvY6lrR+yqDaS/Ropon9PwDNiIP/2KTblg30UB2TgfetiBKgab7v91AQ2d6iRtkkl3 kUsA2pkPnAFo8oCweLpS2bNwnLzRZvvzr1t1tUQp42qyHNCM6c96bMocWNrrn0P4ftze JYMDLkXv5nPpVNUiHkf7BRUSy6qLqxNHqVi6RJmJ+IWiZWz/zxqjRVLvC+2nK1ZNjxSn BYfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KjEyIBgWOxju0mmrhEAuRZlQnbLRbUEQl/N/hsyGvOE=; b=hmT2cSlFf9iFZxovvhrxjDd9/3jvtxxczvlSXiLHVED6jmu7PXX7+7TDw0iOGiHGGj 0Nccp/ODEzPK9N4rPxmGt4E22TwCa5n8AxlF8lGLFuvgXQVfBHz8iD3fat0gL29rSCTT pI/Z7HzweSeysJve9VNyiF/zLuERFuaTUvpyZOSaeZ/rZbldjtjHUzh66hhd47brFjaJ Vouu6ONQgCse32rHlkX4H8ty4Tk1ixiiCuAzb0s53/8V0Sq69byOey3WsVrQdj1begMu 0h/YS9w0qt9uzqGpEGomzUfCe92FwJ0pPWccpGYEtJRyu3/ZOl2GZnxseMH+2okxgWdE 1CyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MCmQ8uEW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr35-20020a1709073fa300b007c1633cea0csi29151527ejc.513.2023.01.03.02.32.57; Tue, 03 Jan 2023 02:33:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MCmQ8uEW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229673AbjACK2X (ORCPT + 61 others); Tue, 3 Jan 2023 05:28:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236949AbjACK2C (ORCPT ); Tue, 3 Jan 2023 05:28:02 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E81710AA; Tue, 3 Jan 2023 02:28:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 026BB61227; Tue, 3 Jan 2023 10:28:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AECE4C433EF; Tue, 3 Jan 2023 10:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672741680; bh=6PGDo16yafa7I9D0QeQ4c1gBmHp7RJPl6cLfC9sVHg4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MCmQ8uEWkUFm9M3qCEafRk7Obrh0hhcE4CZOm0g4So3eKAhOovlKEkecgIcY6VmQZ PPMJk71kLnq2WZ487jmZqpZ1rYj5rS+8yxR8j3x5PYA6khDnIHuUvxmxx3uFOMIMnN GwUs3D3C+oOcfMJJGjSWJ6EDblMJFDOFX/Ilca95/qcLuUVzkwVAps4yvu2guo+pzA 49iMu3mPaeqfCH0fxeiMohgXGuglz2uAa1yl2wzSUMSEpx1HEA59RmlTsuejwyo72J ndPiyFiRohR6UXdSstod7guwn9cQI9kO+lmibZ9YmYeDLmW9QmftsuPkWPn3znB1Zf tdQljd76RMI6w== Date: Tue, 3 Jan 2023 11:27:55 +0100 From: Christian Brauner To: Siddh Raman Pant Cc: Seth Forshee , Shuah Khan , linux-fsdevel , linux-kselftests , linux-kernel Subject: Re: [PATCH] selftests/mount_setattr: Remove redefinition of struct mount_attr Message-ID: <20230103102755.eks34kwcufoz7znx@wittgenstein> References: <20221211092820.85527-1-code@siddh.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221211092820.85527-1-code@siddh.me> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 11, 2022 at 02:58:20PM +0530, Siddh Raman Pant wrote: > It is already included via sys/mount.h on line 10. > > GCC error reproducible by: make kselftest TARGETS="mount_setattr" > > mount_setattr_test.c:107:8: error: redefinition of ‘struct mount_attr’ > 107 | struct mount_attr { > | ^~~~~~~~~~ > In file included from /usr/include/x86_64-linux-gnu/sys/mount.h:32, > from mount_setattr_test.c:10: > ../../../../usr/include/linux/mount.h:129:8: note: originally defined here > 129 | struct mount_attr { > | ^~~~~~~~~~ > > Signed-off-by: Siddh Raman Pant > --- > tools/testing/selftests/mount_setattr/mount_setattr_test.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c > index 8c5fea68ae67..582669ca38e9 100644 > --- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c > +++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c > @@ -103,13 +103,6 @@ > #else > #define __NR_mount_setattr 442 > #endif > - > -struct mount_attr { > - __u64 attr_set; > - __u64 attr_clr; > - __u64 propagation; > - __u64 userns_fd; > -}; > #endif Honestly, until the conflicts between linux/mount.h and sys/mount.h are fixed properly we should probably just not include either linux/mount.h nor sys/mount.h and just define all the things we need in this single test file.