[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 8 Aug 2023 10:05:20 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Christian Brauner <brauner@...nel.org>
Cc: Mateusz Guzik <mjguzik@...il.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, oleg@...hat.com,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v2 (kindof)] fs: use __fput_sync in close(2)
On Tue, 8 Aug 2023 at 09:30, Christian Brauner <brauner@...nel.org> wrote:
>
> At least make this really dumb and obvious and keep the ugliness to
> internal.h and open.c
See the patch I just sent out.
I hate yours too, for that nasty "bool may_delay".
I hate those "bool flag" things that change behavior of a function. It
may be obvious when you look at the function itself, and know the
code, but then it causes things like this:
return __filp_close(filp, id, true);
and there is zero clue about what the heck 'true' means.
At least then the "behavior flags" are named bitmasks, things make
*sense*. But we have too many of these boolean arguments.
And yes, I realize that we have tons of extant ones, and this would be
only one more in a sea of others. That doesn't make it ok. So please
keep it to when it *has* to be done to avoid major problems.
Linus
Powered by blists - more mailing lists