lkml.org 
[lkml]   [2019]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: "fs/namei.c: keep track of nd->root refcount status" causes boot panic
On Tue, Sep 03, 2019 at 06:56:10PM +0100, Al Viro wrote:
> On Tue, Sep 03, 2019 at 08:39:30AM -0700, Christoph Hellwig wrote:
>
> > > There's much nastier situation than "new upstream kernel released,
> > > need to rebuild" - it's bisect in mainline trying to locate something...
> >
> > I really don't get the point. And it's not like we've card about
> > this anywhere else. And jumping wildly around with the numeric values
> > for constants will lead to bugs like the one you added and fixed again
> > and again.
>
> The thing is, there are several groups - it's not as if all additions
> were guaranteed to be at the end. So either we play with renumbering
> again and again, or we are back to the square one...
>
> Is there any common trick that would allow to verify the lack of duplicates
> at the build time?

What about:

static_assert(
(LOOKUP_FOLLOW^LOOKUP_DIRECTORY^LOOKUP_AUTOMOUNT^LOOKUP_EMPTY^LOOKUP_DOWN^
LOOKUP_REVAL^LOOKUP_RCU^
LOOKUP_OPEN^LOOKUP_CREATE^LOOKUP_EXCL^LOOKUP_RENAME_TARGET^
LOOKUP_PARENT^LOOKUP_NO_REVAL^LOOKUP_JUMPED^LOOKUP_ROOT^LOOKUP_ROOT_GRABBED)
==
(LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_AUTOMOUNT|LOOKUP_EMPTY|LOOKUP_DOWN|
LOOKUP_REVAL|LOOKUP_RCU|
LOOKUP_OPEN|LOOKUP_CREATE|LOOKUP_EXCL|LOOKUP_RENAME_TARGET|
LOOKUP_PARENT|LOOKUP_NO_REVAL|LOOKUP_JUMPED|LOOKUP_ROOT|LOOKUP_ROOT_GRABBED)
, "duplicated LOOKUP_* constant");

?

- Kevin

\
 
 \ /
  Last update: 2019-09-05 14:27    [W:0.077 / U:9.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site