patch-2.1.129 linux/include/linux/auto_fs.h

Next file: linux/include/linux/fb.h
Previous file: linux/include/asm-sparc64/spinlock.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.128/linux/include/linux/auto_fs.h linux/include/linux/auto_fs.h
@@ -22,6 +22,27 @@
 
 #define AUTOFS_PROTO_VERSION 3
 
+/*
+ * Architectures where both 32- and 64-bit binaries can be executed
+ * on 64-bit kernels need this.  This keeps the structure format
+ * uniform, and makes sure the wait_queue_token isn't too big to be
+ * passed back down to the kernel.
+ *
+ * This assumes that on these architectures:
+ * mode     32 bit    64 bit
+ * -------------------------
+ * int      32 bit    32 bit
+ * long     32 bit    64 bit
+ *
+ * If so, 32-bit user-space code should be backwards compatible.
+ */
+
+#if defined(__sparc__) || defined(__mips__)
+typedef unsigned int autofs_wqt_t;
+#else
+typedef unsigned long autofs_wqt_t;
+#endif
+
 enum autofs_packet_type {
 	autofs_ptype_missing,	/* Missing entry (mount request) */
 	autofs_ptype_expire,	/* Expire entry (umount request) */
@@ -34,7 +55,7 @@
 
 struct autofs_packet_missing {
 	struct autofs_packet_hdr hdr;
-        unsigned long wait_queue_token;
+        autofs_wqt_t wait_queue_token;
 	int len;
 	char name[NAME_MAX+1];
 };	

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov