Messages in this thread | | | From | Linus Torvalds <> | Date | Sat, 22 Feb 2020 18:14:45 -0800 | 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@zeniv.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
| |