Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp908711ybv; Sat, 22 Feb 2020 18:16:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxjHNkTwp6gwisw4TAq/8ZcbnXBL+PlnCdhtNHBzP0EFDiCpU3v3F0oZeUbu92sRxuz73WB X-Received: by 2002:a9d:1284:: with SMTP id g4mr32624002otg.47.1582424189401; Sat, 22 Feb 2020 18:16:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582424189; cv=none; d=google.com; s=arc-20160816; b=eolyvIDr/pfSxAAsG0ZJFhTNLk7VqZnKfqzcUBSckAJksbZrlIHg9NMiOCQdSL4D8h Sy0pUBw3UeTw5fyQxuV4thwrRp4z9mtqOJrpcmWSszDin7l8RnL6DzM0HlaGbSarv6lw mJPjPPZsHP02Mv/2Ng+a07fBNFFO3Fq0bxOSKwGW8IRwNl2YXhfa4XbxuCFRNylrXnNE Mty08ZhojV32YTv4kEtI6lrcg3j0ziJ+KI9mvzthrXrlVhKP07QnXwTVRCDezGk+FrQO w5Zu8d7VfxLazT/+tdRgL3Oyv8S1v1zoX1T2wstv5nyaK2j0+yOHxUuQuwNrQxXSaI// pH8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=usCPDZzqoEQffaBHKz63gbophNqdIvzMOB5/yaDj3Ek=; b=hKyFXdOn9p7+oe0AnV0kQqikCqFxJbaO9Zd73GucfNWlaVI8IIEpiu6ZzEcpYEuycc SwBjYY16KcqKzWx8mh4tyBazwMADSTZXYB/jJDHjQs48n/K1uNXVBd8LoSknZAKZaKnu dCBe01c8W0OVCeCSHLXstp1FkwsglIFq1v1wpYPuk5JanjkYxM4ggD5i6gqXEw+wVE/3 0aXBRp5vDrnwn6Qs+l/OR1fWXsVT9ZjVs9NVhFX2yYB0rFSWqHMf1kXXibknujv1KBwI PCRKOU2bbFBKGf5k2GLM/lYHZNCtiL6U3vrNY2WtihM850KVTn5Q8ENwLquLJQlm1k1i ILsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Ft335B/q"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si4279844otn.140.2020.02.22.18.16.15; Sat, 22 Feb 2020 18:16:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Ft335B/q"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbgBWCPE (ORCPT + 99 others); Sat, 22 Feb 2020 21:15:04 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:43934 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726983AbgBWCPE (ORCPT ); Sat, 22 Feb 2020 21:15:04 -0500 Received: by mail-lf1-f68.google.com with SMTP id s23so4287190lfs.10 for ; Sat, 22 Feb 2020 18:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=usCPDZzqoEQffaBHKz63gbophNqdIvzMOB5/yaDj3Ek=; b=Ft335B/q4kOGEdbWJ0HffT8n8Ks0hvRKKjTvQ3F6wbdJ99TgY+eIt6+6Fy0GK774yr tYPrBAkT6L2g0sIK/wKLCIs8tAZgXl0SjKxSY3CbR9SbAlgPerdD0j+hCaheptaAknOt +y1EqTRtlN7zsr7V1qD6Wtb4ddO2Rwm46DDMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=usCPDZzqoEQffaBHKz63gbophNqdIvzMOB5/yaDj3Ek=; b=Bm2yvC33kbuUmI76ZI6Ny8yiCClTEqKeHVcEIcCZUuEfAppXfVd67JAaBgBY5XV9jC EKa3NUIZYlTMof3R7ZIzjaATUWvXoUrZAPhqwvrX8jrq31hE8jieeec5rJpjA8tDITvv MHYgRIFUSeNgI28zGvhbK3ZFLHoo2zTfajGbBSQFsSv8TRb+HVwencURlOJ8fa/0flhF 5z98S+8eTEjvuSX5JRlbxP51y9HNss1voNabbXWkXZJqVBFbQLX6iDCHRwfjERF6g/kz iyHfQYCMsyPSNG73pfPS+vuwYWV98NYr1bjY2rVSsjhViaqQKWst6+pIZbTmlYr/s8Hv ntXg== X-Gm-Message-State: APjAAAXUHtrIJi6UVY1EAbG2d2oTIeB6NytjDBGJVmxcKYU8N3tnepIr Y1svtifhro65eowRoZisp0KaWG30oAw= X-Received: by 2002:ac2:44d5:: with SMTP id d21mr23611745lfm.188.1582424102172; Sat, 22 Feb 2020 18:15:02 -0800 (PST) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id 14sm3928028ljj.32.2020.02.22.18.15.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Feb 2020 18:15:01 -0800 (PST) Received: by mail-lj1-f177.google.com with SMTP id n18so6214790ljo.7 for ; Sat, 22 Feb 2020 18:15:01 -0800 (PST) X-Received: by 2002:a2e:88c5:: with SMTP id a5mr26872226ljk.201.1582424100766; Sat, 22 Feb 2020 18:15:00 -0800 (PST) MIME-Version: 1.0 References: <20200223011154.GY23230@ZenIV.linux.org.uk> <20200223011626.4103706-1-viro@ZenIV.linux.org.uk> <20200223011626.4103706-14-viro@ZenIV.linux.org.uk> In-Reply-To: <20200223011626.4103706-14-viro@ZenIV.linux.org.uk> From: Linus Torvalds Date: Sat, 22 Feb 2020 18:14:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC][PATCH v2 14/34] new step_into() flag: WALK_NOFOLLOW To: Al Viro Cc: linux-fsdevel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 22, 2020 at 5:20 PM Al Viro wrote: > > if (likely(!d_is_symlink(path->dentry)) || > - !(flags & WALK_FOLLOW || nd->flags & LOOKUP_FOLLOW)) { > + !(flags & WALK_FOLLOW || nd->flags & LOOKUP_FOLLOW) || > + flags & WALK_NOFOLLOW) { Humor me, and don't mix bitwise ops with logical boolean ops without parentheses, ok? And yes, the old code did it too, so it's not a new thing. But as it gets even more complex, let's just generally strive for doing (a & b) || (c & d) instead of a & b || c & d to make it easier to mentally see the grouping. Linus