Commit 0f75e00c9ac5c7b127b5f1f48f1dc421be507133
Committed by
Linus Torvalds
1 parent
bdff071dbf
Exists in
master
and in
7 other branches
[PATCH] switch fs3270 to ->compat_ioctl
Again easy because all ioctls are compat clean. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 2 changed files with 11 additions and 16 deletions Side-by-side Diff
arch/s390/kernel/compat_ioctl.c
... | ... | @@ -64,13 +64,6 @@ |
64 | 64 | COMPATIBLE_IOCTL(BIODASDCMFDISABLE) |
65 | 65 | COMPATIBLE_IOCTL(BIODASDREADALLCMB) |
66 | 66 | |
67 | -COMPATIBLE_IOCTL(TUBICMD) | |
68 | -COMPATIBLE_IOCTL(TUBOCMD) | |
69 | -COMPATIBLE_IOCTL(TUBGETI) | |
70 | -COMPATIBLE_IOCTL(TUBGETO) | |
71 | -COMPATIBLE_IOCTL(TUBSETMOD) | |
72 | -COMPATIBLE_IOCTL(TUBGETMOD) | |
73 | - | |
74 | 67 | COMPATIBLE_IOCTL(TAPE390_DISPLAY) |
75 | 68 | |
76 | 69 | /* s390 doesn't need handlers here */ |
drivers/s390/char/fs3270.c
... | ... | @@ -319,9 +319,8 @@ |
319 | 319 | /* |
320 | 320 | * process ioctl commands for the tube driver |
321 | 321 | */ |
322 | -static int | |
323 | -fs3270_ioctl(struct inode *inode, struct file *filp, | |
324 | - unsigned int cmd, unsigned long arg) | |
322 | +static long | |
323 | +fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |
325 | 324 | { |
326 | 325 | struct fs3270 *fp; |
327 | 326 | struct raw3270_iocb iocb; |
... | ... | @@ -331,6 +330,7 @@ |
331 | 330 | if (!fp) |
332 | 331 | return -ENODEV; |
333 | 332 | rc = 0; |
333 | + lock_kernel(); | |
334 | 334 | switch (cmd) { |
335 | 335 | case TUBICMD: |
336 | 336 | fp->read_command = arg; |
... | ... | @@ -356,6 +356,7 @@ |
356 | 356 | rc = -EFAULT; |
357 | 357 | break; |
358 | 358 | } |
359 | + unlock_kernel(); | |
359 | 360 | return rc; |
360 | 361 | } |
361 | 362 | |
... | ... | @@ -491,12 +492,13 @@ |
491 | 492 | } |
492 | 493 | |
493 | 494 | static struct file_operations fs3270_fops = { |
494 | - .owner = THIS_MODULE, /* owner */ | |
495 | - .read = fs3270_read, /* read */ | |
496 | - .write = fs3270_write, /* write */ | |
497 | - .ioctl = fs3270_ioctl, /* ioctl */ | |
498 | - .open = fs3270_open, /* open */ | |
499 | - .release = fs3270_close, /* release */ | |
495 | + .owner = THIS_MODULE, /* owner */ | |
496 | + .read = fs3270_read, /* read */ | |
497 | + .write = fs3270_write, /* write */ | |
498 | + .unlocked_ioctl = fs3270_ioctl, /* ioctl */ | |
499 | + .compat_ioctl = fs3270_ioctl, /* ioctl */ | |
500 | + .open = fs3270_open, /* open */ | |
501 | + .release = fs3270_close, /* release */ | |
500 | 502 | }; |
501 | 503 | |
502 | 504 | /* |