public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* IA-32 support patch: fcntl64 calls are broken
@ 2003-06-24 22:51 Arun Sharma
  2003-06-25 16:53 ` Bjorn Helgaas
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Arun Sharma @ 2003-06-24 22:51 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]


Currently, sys32_fcntl64() is broken, because it passes F_*64 commands to sys_fcntl(), which it doesn't understand. The F_XXX64 commands need to be converted to F_XXX before calling sys_fcntl().

We also eliminated a copy, because the 32 bit struct flock64 and the 64 bit struct flock seem to be identical.

This patch is relevant only to 2.4, as it has already been taken care of in 2.5.

	-Arun

[-- Attachment #2: fcntl.29.txt --]
[-- Type: text/plain, Size: 654 bytes --]

--- linux/arch/ia64/ia32/sys_ia32.c-	2003-05-28 23:37:02.000000000 -0700
+++ linux/arch/ia64/ia32/sys_ia32.c	2003-06-24 02:47:10.000000000 -0700
@@ -3618,14 +3595,9 @@
 	      case F_GETLK64:
 	      case F_SETLK64:
 	      case F_SETLKW64:
-		if (ia32_get_flock(&f, arg))
-			return -EFAULT;
-		old_fs = get_fs();
-		set_fs(KERNEL_DS);
-		ret = sys_fcntl(fd, cmd, (unsigned long) &f);
-		set_fs(old_fs);
-		if (cmd == F_GETLK && ia32_put_flock(&f, arg))
-			return -EFAULT;
+		ret = sys_fcntl(fd, (cmd == F_GETLK64) ? F_GETLK :
+			((cmd == F_SETLK64) ? F_SETLK : F_SETLKW),
+			(unsigned long)arg);
 		break;
 
 	      default:



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-07-15 19:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-24 22:51 IA-32 support patch: fcntl64 calls are broken Arun Sharma
2003-06-25 16:53 ` Bjorn Helgaas
2003-06-25 18:18 ` Arun Sharma
2003-06-25 21:06 ` Bjorn Helgaas
2003-06-26  1:27 ` Stephen Rothwell
2003-06-26  5:02 ` Bjorn Helgaas
2003-07-08 18:57 ` Arun Sharma
2003-07-08 19:16 ` Matthew Wilcox
2003-07-08 21:51 ` Arun Sharma
2003-07-15 19:26 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox