lkml.org 
[lkml]   [2003]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[UPDATED PATCH] Re: 2.5.63 - if/ifdef janitor work - actual bug found..
From
Date
On Thu, 27 Feb 2003 14:42:50 CST, Thomas Molina said:

> Why couldn't it be MAY_OWNER_OVERRIDE??? There are occurrences of
> MAY_OWNER_OVERRIDE

Yes, but then the logic becomes:

#if (a | b | MAY_OWNER_OVERRIDE) & (c | d | MAY_OWNER_OVERRIDE)
#error ....
#endif

so it will *alway* error out. Tried it, it #errored, I looked at it
more closely. The logic there is that it wants to have the two sets
(SATTR, TRUNC, LOCK, LOCAL_ACCESS) and (READ, WRITE, EXEC, OVERRIDE)
as disjoint sets of bits.

And yes, somebody else pointed out that the #error test probably needs
to be cleaned up too..

/Valdis

--- include/linux/nfsd/nfsd.h.dist 2003-02-24 14:06:01.000000000 -0500
+++ include/linux/nfsd/nfsd.h 2003-02-27 16:01:59.000000000 -0500
@@ -39,8 +39,8 @@
#define MAY_LOCK 32
#define MAY_OWNER_OVERRIDE 64
#define MAY_LOCAL_ACCESS 128 /* IRIX doing local access check on device special file*/
-#if (MAY_SATTR | MAY_TRUNC | MAY_LOCK | MAX_OWNER_OVERRIDE | MAY_LOCAL_ACCESS) & (MAY_READ | MAY_WRITE | MAY_EXEC | MAY_OWNER_OVERRIDE)
-# error "please use a different value for MAY_SATTR or MAY_TRUNC or MAY_LOCK or MAY_OWNER_OVERRIDE."
+#if (MAY_SATTR | MAY_TRUNC | MAY_LOCK | MAY_LOCAL_ACCESS) & (MAY_READ | MAY_WRITE | MAY_EXEC | MAY_OWNER_OVERRIDE)
+# error "please use a different value for MAY_SATTR or MAY_TRUNC or MAY_LOCK or MAY_LOCAL_ACCESS."
#endif
#define MAY_CREATE (MAY_EXEC|MAY_WRITE)
#define MAY_REMOVE (MAY_EXEC|MAY_WRITE|MAY_TRUNC)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.025 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site