lkml.org 
[lkml]   [2023]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 (kindof)] fs: use __fput_sync in close(2)
Date
From: Linus Torvalds
> Sent: 08 August 2023 18:05
...
> 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 make the usual case 0.

I was chasing through some code that has a flag for a
conditional lock.
However is was 'NEED_TO_LOCK' not 'ALREADY_LOCKED'.
(bpf calling in with the socket locked).

As well as making the code harder to read it is an accident
just waiting to happen.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2023-08-09 11:04    [W:0.050 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site