lkml.org 
[lkml]   [2020]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2020-02-23 03:16    [W:0.570 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site