From: Tony Luck <tony.luck@intel.com>
Date: Tue, 30 Aug 2005 21:59:24 +0000 (-0700)
Subject: [IA64] Low byte of current->personality is not a bitmask.
X-Git-Tag: v2.6.14-rc1~1019^2~2
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ff67b59726a8cd3549b069dfa78de2f538d3b8e3;p=linux-2.6-omap-h63xx.git

[IA64] Low byte of current->personality is not a bitmask.

Peter Staubach pointed out that it is not correct to check
current->personality & PER_LINUX32 (this will have false
hits on several other personality values).

Signed-off-by: Tony Luck <tony.luck@intel.com>
---

diff --git a/include/asm-ia64/fcntl.h b/include/asm-ia64/fcntl.h
index c9f8d835d0c..cee16ea1780 100644
--- a/include/asm-ia64/fcntl.h
+++ b/include/asm-ia64/fcntl.h
@@ -81,6 +81,7 @@ struct flock {
 
 #define F_LINUX_SPECIFIC_BASE	1024
 
-#define force_o_largefile() ( ! (current->personality & PER_LINUX32) )
+#define force_o_largefile()	\
+		(personality(current->personality) != PER_LINUX32)
 
 #endif /* _ASM_IA64_FCNTL_H */