patch-2.4.21 linux-2.4.21/arch/parisc/kernel/sys_parisc32.c

Next file: linux-2.4.21/arch/parisc/kernel/syscall.S
Previous file: linux-2.4.21/arch/parisc/kernel/setup.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/arch/parisc/kernel/sys_parisc32.c linux-2.4.21/arch/parisc/kernel/sys_parisc32.c
@@ -2759,20 +2759,9 @@
 
 asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
-	switch (cmd) {
-		case F_GETLK64:
-			cmd = F_GETLK;
-			break;
-		case F_SETLK64:
-			cmd = F_SETLK;
-			break;
-		case F_SETLKW64:
-			cmd = F_SETLKW;
-			break;
-		default:
-			break;
-	}
-	return sys_fcntl(fd, cmd, arg);
+	if (cmd >= F_GETLK64 && cmd <= F_SETLKW64)
+		return sys_fcntl(fd, cmd + F_GETLK - F_GETLK64, arg);
+	return sys32_fcntl(fd, cmd, arg);
 }
 
 asmlinkage int sys32_pread(int fd, void *buf, size_t count, unsigned int high, unsigned int low)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)