| Age | Commit message (Collapse) | Author |
|
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
|
fs/smbfs/inode.c: In function `smb_fill_super':
fs/smbfs/inode.c:563: warning: comparison is always false due to limited range of data type
Unfortunately, this patch uses the notorious "gcc warning suppression by
obfuscation" technique.
What seems to be going on is that the uid and gid convert macros in
include/linux/highuid.h:
#define __convert_uid(size, uid) \
(size >= sizeof(uid) ? (uid) : high2lowuid(uid))
only call high2lowuid in the case of trying to put a bigger (32 bit, say)
uid/gid in a smaller (16 bit, in this case) word. Gcc is smart enough to see
that the comparison in high2lowuid() macro is silly if called with a 16 bit
source uid, but not smart enough to understand from the __convert_uid() logic
that this is exactly the case that high2lowuid() won't be called.
So replace the logical "<" operator with the bit op "&~". This obfuscates
things enough to shut gcc up.
Only build the half-dozen files that use SET_UID/SET_GID, on arch i386 and
ia64. Only the file fs/smbfs/inode.c showed the warning, both arch's, and
this patch fixed both. Untested further, past staring at the code long enough
to convince myself the change has no actual affect on the code's results.
Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
unconditional. Simplify the macros.
|
|
This fixes CONFIG_UID16 problems on x86-64 as discussed earlier.
CONFIG_UID16 now only selects the inclusion of kernel/uid16.c, all
conversions are triggered dynamically based on type sizes. This allows
x86-64 to both include uid16.c for emulation purposes, but not truncate
uids to 16bit in sys_newstat.
- Replace the old macros from linux/highuid.h with new SET_UID/SET_GID
macros that do type checking. Based on Linus' proposal.
- Fix everybody to use them.
- Clean up some cruft in the x86-64 32bit emulation allowed by this
(other 32bit emulations could be cleaned too, but I'm too lazy for
that right now)
- Add one missing EOVERFLOW check in x86-64 32bit sys_newstat while
I was at it.
|
|
them instead of direct references to low2highfoo.
|
|
|