Re: [RFC][PATCH v2 14/34] new step_into() flag: WALK_NOFOLLOW

From: Linus Torvalds
Date: Sat Feb 22 2020 - 21:15:20 EST


On Sat, Feb 22, 2020 at 5:20 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> 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