[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whzmY4RdkqtitWVB=OJvHG-8_VLZrU1oXBX8b+5qJKBag@mail.gmail.com>
Date: Sat, 22 Feb 2020 18:14:45 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH v2 14/34] new step_into() flag: WALK_NOFOLLOW
On Sat, Feb 22, 2020 at 5:20 PM Al Viro <viro@...iv.linux.org.uk> 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
Powered by blists - more mailing lists