Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1657759ioo; Sun, 22 May 2022 23:18:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq/t3ze+Msvcp4Md56l8txYUJifrz5UJgy3DbBXJ1bqMyNW5gpSoXzzSw7KnaTlQDbEUMy X-Received: by 2002:a17:90b:4a90:b0:1df:e3af:c6ad with SMTP id lp16-20020a17090b4a9000b001dfe3afc6admr20668043pjb.41.1653286696870; Sun, 22 May 2022 23:18:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653286696; cv=none; d=google.com; s=arc-20160816; b=A7PMeCjjrkHQyPjg48DzLPIVteky5vevv60kE224m7Wpn8pNtYlF6/rm4w6XqWVx5x w1IGFMolFxcxTelhzPJgJV8fVPIe9GHFmiA9LoY4inUsMgBkUj20Lv9SsRlnFDYNzUv1 FBTRETE42oGDLS1Esgs75Df0gOWuVVmcxVbb35P58VSFkmUmemo4Q0GgioEI6x0POqKi Ky+5pdxMYhj+lRmV2jHiEbImRs2Q2RIV/Vr0I8w6BweKOodQM8fAhh7CkCFo8R5M7GGt 4WBhevfYsK8yobT9uC1FQs9n2xYfcdJe5YRnciCQAADdK7WvwdqyJJC4W5GRofrMKyuo ofKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language:cc:to :subject:from:user-agent:mime-version:date:message-id:dkim-signature; bh=D03ydFw/WCBSetrgrLyLuEKUcsWGma78s11UxloWKTY=; b=XSM7V2UENAwy9O9RksrhCmeWEuBc74Vljx4mXQD16Ll5xCvwnPlTx+y59uZfp75E+v aQQfQMI9DAlTZhQFTRMFQ6YmHdTggypUzSikA4af3O/9ckzLRrRd9ZFWk9OD2BapJxHB AFT7PqLXdH6hX52py7VC+7C/JR6riOgZwkqZlIiDe2JiD6PmXxx4wVERI7o/l49kd8jL hun6IjsXmGd2gnKRAe45GnwU3SE2pEIG8CQYlJj5krpKJTG7T78CHEOVlx7aYa7USp3p TAo+WXojamwr9N4VUD/eZJO4WC4KHqJ7icFb6TyaDrOZQsPKaHOflHU3WHeG5TvAQvo0 Hx/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=B6BtDBw4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id ku13-20020a17090b218d00b001d991dfad30si12278018pjb.153.2022.05.22.23.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:18:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=B6BtDBw4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1ADD3EB94; Sun, 22 May 2022 23:02:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343961AbiEVMHd (ORCPT + 99 others); Sun, 22 May 2022 08:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235275AbiEVMH3 (ORCPT ); Sun, 22 May 2022 08:07:29 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55E18344D3 for ; Sun, 22 May 2022 05:07:28 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id y32so21255006lfa.6 for ; Sun, 22 May 2022 05:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz-org.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :content-language:content-transfer-encoding; bh=D03ydFw/WCBSetrgrLyLuEKUcsWGma78s11UxloWKTY=; b=B6BtDBw4rMQCE6wErr2x8tUIheNWfWC+otgK2fKJMhu+7J/JtRwRq6uN17lIPp6/dt siRQtTcRxrWw5u42XmfYpFUVEt2BhJH5CXgLQvoLxsbl6SX20uxc7hAKM4pNSnQET9y+ qEwxVsCW86KHPKKaTSRY8ro2QD6TdgPtn3tdoYa0L+Fe5hV+06tTRHS/npS5C+RcjAvV vI3N3Vo+EnN8i+Ij3djYInWNJY91W8+6TfKmUwDhq7k/RNSLpQgsoGc6yEKCMZyY7Bf2 aRGCxOqTGxRLv983tVqGVOpejZgryh1OB2NYTyoRBYq8AS2lTuXo1R2yFGTyqbCWLxMF Yijw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:content-language:content-transfer-encoding; bh=D03ydFw/WCBSetrgrLyLuEKUcsWGma78s11UxloWKTY=; b=WhbXAQixFcZ/qMrQ5cma2wY2A2YbHVK1LAmiD204z/EDy0yoIrr6ss+VJZoFKdNm7z TChwF5EgZilZSBwZRo7nfsHI/4pjvKnNOjzPGdk6kfC0hOOOfzO60mVlaH90gXPLCBF3 r1RcknqQdhNB4nIYkh3JlbbrIH2jZkXd0xaGWYzN2gaUSvwZPYhVX04PKJBzYO55j0pJ 8igIKJurCZvBCmD6XJKtAB2b/+QMTkYugxYgKV75aKgDKmR5H26n771h0qAWtdoevATU XKJliTO/53fLPibD0neeU8DCiT2rWYqxzGn25X3V0vbsF1kfAgWcKu78zp7nzEEMPnmo BpWg== X-Gm-Message-State: AOAM530r0J6Vj/fjK+7OUFImsxPcnVNHc1v72TuGGUpmZvez9Gac0OVp XCeYD1sA0kiqtuAGwuM0bDmAGA== X-Received: by 2002:a05:6512:3da0:b0:478:5b79:d76e with SMTP id k32-20020a0565123da000b004785b79d76emr6080851lfv.540.1653221246703; Sun, 22 May 2022 05:07:26 -0700 (PDT) Received: from [192.168.1.65] ([46.188.121.185]) by smtp.gmail.com with ESMTPSA id o23-20020ac24e97000000b0047255d211b0sm1429386lfr.223.2022.05.22.05.07.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 May 2022 05:07:26 -0700 (PDT) Message-ID: Date: Sun, 22 May 2022 15:07:25 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 From: Vasily Averin Subject: [PATCH v3] fs/open.c: fix incorrect fmode_t cast in build_open_how To: linux-fsdevel@vger.kernel.org Cc: kernel@openvz.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Alexander Viro , Christian Brauner Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fixes sparce warning: fs/open.c:1024:21: sparse: warning: restricted fmode_t degrades to integer FMODE_NONOTIFY have bitwise fmode_t type which requires __force for any casts. Use __FMODE_NONTIFY instead. Signed-off-by: Vasily Averin Acked-by: Jan Kara Reviewed-by: Christian Brauner (Microsoft) --- v3: split, according to Christoph Hellwig recommendation --- fs/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/open.c b/fs/open.c index 1315253e0247..386c52e4c3b1 100644 --- a/fs/open.c +++ b/fs/open.c @@ -1021,7 +1021,7 @@ inline struct open_how build_open_how(int flags, umode_t mode) inline int build_open_flags(const struct open_how *how, struct open_flags *op) { u64 flags = how->flags; - u64 strip = FMODE_NONOTIFY | O_CLOEXEC; + u64 strip = __FMODE_NONOTIFY | O_CLOEXEC; int lookup_flags = 0; int acc_mode = ACC_MODE(flags); -- 2.36.1