diff options
| -rw-r--r-- | drivers/s390/block/dasd_proc.c | 9 | ||||
| -rw-r--r-- | drivers/s390/char/tape.c | 5 | ||||
| -rw-r--r-- | drivers/s390/char/tapechar.c | 5 | ||||
| -rw-r--r-- | drivers/usb/image/scanner.c | 9 | ||||
| -rw-r--r-- | fs/binfmt_som.c | 36 | ||||
| -rw-r--r-- | fs/intermezzo/psdev.c | 4 | ||||
| -rw-r--r-- | fs/intermezzo/super.c | 5 |
7 files changed, 14 insertions, 59 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 1b78dc22a457..e7df396559bf 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c @@ -65,7 +65,6 @@ dasd_generic_close (struct inode *inode, struct file *file) vfree (info->data); kfree (info); } - MOD_DEC_USE_COUNT; return 0; } @@ -223,12 +222,10 @@ dasd_devices_open(struct inode *inode, struct file *file) int size, len; int devindex; - MOD_INC_USE_COUNT; info = (tempinfo_t *) kmalloc(sizeof (tempinfo_t), GFP_KERNEL); if (info == NULL) { MESSAGE(KERN_WARNING, "%s", "No memory available for data (tempinfo)"); - MOD_DEC_USE_COUNT; return -ENOMEM; } @@ -239,7 +236,6 @@ dasd_devices_open(struct inode *inode, struct file *file) MESSAGE(KERN_WARNING, "%s", "No memory available for data (info->data)"); kfree(info); - MOD_DEC_USE_COUNT; return -ENOMEM; } file->private_data = (void *) info; @@ -266,6 +262,7 @@ dasd_devices_open(struct inode *inode, struct file *file) } static struct file_operations dasd_devices_file_ops = { + owner:THIS_MODULE, read:dasd_generic_read, /* read */ write:dasd_devices_write, /* write */ open:dasd_devices_open, /* open */ @@ -299,12 +296,10 @@ dasd_statistics_open(struct inode *inode, struct file *file) int shift; #endif - MOD_INC_USE_COUNT; info = (tempinfo_t *) kmalloc(sizeof (tempinfo_t), GFP_KERNEL); if (info == NULL) { MESSAGE(KERN_WARNING, "%s", "No memory available for data (tempinfo)"); - MOD_DEC_USE_COUNT; return -ENOMEM; } @@ -317,7 +312,6 @@ dasd_statistics_open(struct inode *inode, struct file *file) "No memory available for data (info->data)"); kfree(info); file->private_data = NULL; - MOD_DEC_USE_COUNT; return -ENOMEM; } #ifdef CONFIG_DASD_PROFILE @@ -422,6 +416,7 @@ out_error: } static struct file_operations dasd_statistics_file_ops = { + owner: THIS_MODULE, read: dasd_generic_read, /* read */ write: dasd_statistics_write, /* write */ open: dasd_statistics_open, /* open */ diff --git a/drivers/s390/char/tape.c b/drivers/s390/char/tape.c index e321e9c9dc90..4cd6318ad5c4 100644 --- a/drivers/s390/char/tape.c +++ b/drivers/s390/char/tape.c @@ -199,6 +199,7 @@ typedef struct { static struct file_operations tape_proc_devices_file_ops = { + owner:THIS_MODULE, read:tape_proc_devices_read, /* read */ open:tape_proc_devices_open, /* open */ release:tape_proc_devices_release, /* close */ @@ -239,12 +240,9 @@ tape_proc_devices_open (struct inode *inode, struct file *file) long lockflags,lockflags2; tape_ccw_req_t *treq; - MOD_INC_USE_COUNT; - procinfo = kmalloc (sizeof(tape_procinfo_t),GFP_KERNEL); if (!procinfo){ rc = -ENOMEM; - MOD_DEC_USE_COUNT; goto out_no_lock; } @@ -349,7 +347,6 @@ tape_proc_devices_release (struct inode *inode, struct file *file) tape_procinfo_t *p_info = (tape_procinfo_t *) file->private_data; vfree(p_info->data); kfree (p_info); - MOD_DEC_USE_COUNT; return rc; } diff --git a/drivers/s390/char/tapechar.c b/drivers/s390/char/tapechar.c index 98c82f1522a4..445243d40cda 100644 --- a/drivers/s390/char/tapechar.c +++ b/drivers/s390/char/tapechar.c @@ -40,6 +40,7 @@ */ static struct file_operations tape_fops = { + owner:THIS_MODULE, read:tapechar_read, write:tapechar_write, ioctl:tapechar_ioctl, @@ -548,8 +549,6 @@ tapechar_open (struct inode *inode, struct file *filp) int rc = 0; long lockflags; - MOD_INC_USE_COUNT; - tape_sprintf_event (tape_dbf_area,6,"c:open: %x\n",td->first_minor); inode = filp->f_dentry->d_inode; @@ -580,7 +579,6 @@ out: s390irq_spin_unlock_irqrestore(td->devinfo.irq,lockflags); error: if(rc != 0){ - MOD_DEC_USE_COUNT; if (td!=NULL) tape_put_device(td); } @@ -625,6 +623,5 @@ tapechar_release (struct inode *inode, struct file *filp) if ( td->discipline->owner ) __MOD_DEC_USE_COUNT(td->discipline->owner); tape_put_device(td); - MOD_DEC_USE_COUNT; return rc; } diff --git a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c index 718d7b625d13..6ccbcdb1b242 100644 --- a/drivers/usb/image/scanner.c +++ b/drivers/usb/image/scanner.c @@ -403,8 +403,6 @@ open_scanner(struct inode * inode, struct file * file) int err=0; - MOD_INC_USE_COUNT; - down(&scn_mutex); scn_minor = USB_SCN_MINOR(inode); @@ -413,7 +411,6 @@ open_scanner(struct inode * inode, struct file * file) if (!p_scn_table[scn_minor]) { up(&scn_mutex); - MOD_DEC_USE_COUNT; err("open_scanner(%d): Unable to access minor data", scn_minor); return -ENODEV; } @@ -455,9 +452,6 @@ out_error: up(&(scn->sem)); /* Wake up any possible contending processes */ - if (err) - MOD_DEC_USE_COUNT; - return err; } @@ -488,8 +482,6 @@ close_scanner(struct inode * inode, struct file * file) up(&scn_mutex); up(&(scn->sem)); - MOD_DEC_USE_COUNT; - return 0; } @@ -826,6 +818,7 @@ ioctl_scanner(struct inode *inode, struct file *file, static struct file_operations usb_scanner_fops = { + .owner = THIS_MODULE, .read = read_scanner, .write = write_scanner, .ioctl = ioctl_scanner, diff --git a/fs/binfmt_som.c b/fs/binfmt_som.c index b9ea2556e5b0..1f1165436d91 100644 --- a/fs/binfmt_som.c +++ b/fs/binfmt_som.c @@ -54,7 +54,11 @@ static int som_core_dump(long signr, struct pt_regs * regs); #define SOM_PAGEALIGN(_v) (((_v) + SOM_PAGESIZE - 1) & ~(SOM_PAGESIZE - 1)) static struct linux_binfmt som_format = { - NULL, THIS_MODULE, load_som_binary, load_som_library, som_core_dump, SOM_PAGESIZE + .module = THIS_MODULE, + .load_binary = load_som_binary, + .load_library = load_som_library, + .core_dump = som_core_dump, + .min_coredump = SOM_PAGESIZE }; /* @@ -182,8 +186,8 @@ out: * libraries. There is no binary dependent code anywhere else. */ -static inline int -do_load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs) +static int +load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs) { int som_exec_fileno; int retval; @@ -280,34 +284,11 @@ out: return retval; } -static int -load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_load_som_binary(bprm, regs); - MOD_DEC_USE_COUNT; - return retval; -} - -static inline int -do_load_som_library(struct file *f) +static int load_som_library(struct file *f) { /* No lib support in SOM yet. gizza chance.. */ return -ENOEXEC; } - -static int load_som_library(struct file *f) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_load_som_library(f); - MOD_DEC_USE_COUNT; - return retval; -} - /* Install the SOM loader. * N.B. We *rely* on the table being the right size with the * right number of free slots... @@ -326,4 +307,3 @@ static void __exit exit_som_binfmt(void) module_init(init_som_binfmt); module_exit(exit_som_binfmt); - diff --git a/fs/intermezzo/psdev.c b/fs/intermezzo/psdev.c index 990625d007b4..9c442422adc6 100644 --- a/fs/intermezzo/psdev.c +++ b/fs/intermezzo/psdev.c @@ -311,8 +311,6 @@ static int presto_psdev_open(struct inode * inode, struct file * file) file->private_data = NULL; - MOD_INC_USE_COUNT; - CDEBUG(D_PSDEV, "Psdev_open: caller: %d, flags: %d\n", current->pid, file->f_flags); EXIT; @@ -333,7 +331,6 @@ static int presto_psdev_release(struct inode * inode, struct file * file) return -EBADF; } - MOD_DEC_USE_COUNT; CDEBUG(D_PSDEV, "Lento: pid %d\n", current->pid); channel->uc_pid = 0; @@ -369,6 +366,7 @@ static int presto_psdev_release(struct inode * inode, struct file * file) } static struct file_operations presto_psdev_fops = { + .owner = THIS_MODULE, .read = presto_psdev_read, .write = presto_psdev_write, .poll = presto_psdev_poll, diff --git a/fs/intermezzo/super.c b/fs/intermezzo/super.c index c74c87c88c51..cf076e8ead49 100644 --- a/fs/intermezzo/super.c +++ b/fs/intermezzo/super.c @@ -246,14 +246,11 @@ struct super_block * presto_get_sb(struct file_system_type *izo_type, CDEBUG(D_SUPER, "Presto: type=%s, fset=%s, dev= %d, flags %x\n", cache_type, fileset?fileset:"NULL", minor, cache->cache_flags); - MOD_INC_USE_COUNT; - /* get the filter for the cache */ fstype = get_fs_type(cache_type); cache->cache_filter = filter_get_filter_fs((const char *)cache_type); if ( !fstype || !cache->cache_filter) { CERROR("Presto: unrecognized fs type or cache type\n"); - MOD_DEC_USE_COUNT; EXIT; goto out_err; } @@ -262,7 +259,6 @@ struct super_block * presto_get_sb(struct file_system_type *izo_type, if ( !sb || IS_ERR(sb)) { CERROR("InterMezzo: cache mount failure.\n"); - MOD_DEC_USE_COUNT; EXIT; goto out_err; } @@ -270,7 +266,6 @@ struct super_block * presto_get_sb(struct file_system_type *izo_type, /* can we in fact mount the cache */ if (sb->s_bdev && (strcmp(fstype->name, "vintermezzo") == 0)) { CERROR("vintermezzo must not be used with a block device\n"); - MOD_DEC_USE_COUNT; EXIT; goto out_err; } |
