Re: IA-32 support patch: fcntl64 calls are broken

Arun Sharma
2003-07-08T21:51:16Z

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

Matthew Wilcox wrote:
> On Tue, Jul 08, 2003 at 11:57:21AM -0700, Arun Sharma wrote:
>
>>--- linux/arch/ia64/ia32/sys_ia32.c- Tue Jun 24 15:43:39 2003
>>+++ linux/arch/ia64/ia32/sys_ia32.c Tue Jul 1 14:09:27 2003
>>@@ -3622,9 +3622,11 @@
>> return -EFAULT;
>> old_fs = get_fs();
>> set_fs(KERNEL_DS);
>>- ret = sys_fcntl(fd, cmd, (unsigned long) &f);
>>+ ret = sys_fcntl(fd, (cmd == F_GETLK64) ? F_GETLK :
>
>
> looks like you're using spaces instead of tabs. tsk.
>

I admit to cutting and pasting from 2.5 :) An updated patch with tabs is attached.

-Arun

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

--- linux/arch/ia64/ia32/sys_ia32.c- Tue Jun 24 15:43:39 2003
+++ linux/arch/ia64/ia32/sys_ia32.c Tue Jul 8 14:46:57 2003
@@ -3622,9 +3622,11 @@
return -EFAULT;
old_fs = get_fs();
set_fs(KERNEL_DS);
- ret = sys_fcntl(fd, cmd, (unsigned long) &f);
+ ret = sys_fcntl(fd, (cmd == F_GETLK64) ? F_GETLK :
+ ((cmd == F_SETLK64) ? F_SETLK : F_SETLKW),
+ (unsigned long) &f);
set_fs(old_fs);
- if (cmd == F_GETLK && ia32_put_flock(&f, arg))
+ if (cmd == F_GETLK64 && ia32_put_flock(&f, arg))
return -EFAULT;
break;