Skip to content

Commit

Permalink
[PATCH] s390: use normal switch statement for ioctls in dasd_ioctlc
Browse files Browse the repository at this point in the history
Handle ioctls implemented in dasd_ioctl through the normal switch statement
that most drivers use instead of the awkward dasd_ioctl_no_register routine.
This avoids searching a linear list on every call to dasd_ioctl(), and allows
to give the various ioctl implementation functions sane prototypes, aswell as
moving the check for bdev->bd_disk->private_data from the individual functions
to dasd_ioctl.  (I think it can't actually every be NULL, but let's keep that
for later)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Mar 24, 2006
1 parent 61d3ad0 commit 13c6204
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 161 deletions.
4 changes: 0 additions & 4 deletions drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,6 @@ dasd_exit(void)
#ifdef CONFIG_PROC_FS
dasd_proc_exit();
#endif
dasd_ioctl_exit();
if (dasd_page_cache != NULL) {
kmem_cache_destroy(dasd_page_cache);
dasd_page_cache = NULL;
Expand Down Expand Up @@ -2093,9 +2092,6 @@ dasd_init(void)
rc = dasd_parse();
if (rc)
goto failed;
rc = dasd_ioctl_init();
if (rc)
goto failed;
#ifdef CONFIG_PROC_FS
rc = dasd_proc_init();
if (rc)
Expand Down
2 changes: 0 additions & 2 deletions drivers/s390/block/dasd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,6 @@ int dasd_scan_partitions(struct dasd_device *);
void dasd_destroy_partitions(struct dasd_device *);

/* externals in dasd_ioctl.c */
int dasd_ioctl_init(void);
void dasd_ioctl_exit(void);
int dasd_ioctl_no_register(struct module *, int, dasd_ioctl_fn_t);
int dasd_ioctl_no_unregister(struct module *, int, dasd_ioctl_fn_t);
int dasd_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
Expand Down
Loading

0 comments on commit 13c6204

Please sign in to comment.