[RFC,PATCH] fasync_helper rewrite

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Thu May 04 2000 - 04:24:05 EST


The kernel contains 2 fasync implementations:
* net/socket.c
* drivers/char/tty_io.c

The code in tty_io.c uses cli() for synchronization, and cli() +
tasklets are not SMP safe.

I've written a patch that uses one rwlock for the synchronization, any
comments?

--
	Manfred

// $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 3 // SUBLEVEL = 99 // EXTRAVERSION = -pre6 --- 2.3/include/linux/fs.h Thu Apr 27 11:27:24 2000 +++ build-2.3/include/linux/fs.h Thu May 4 10:04:49 2000 @@ -550,6 +550,15 @@ struct file *fa_file; }; +#define FASYNC_MAGIC 0x4601 + +/* SMP safe fasync helpers: */ +extern int generic_fasync_helper(int, struct file *, int, struct fasync_struct **); +/* can be called from interrupts */ +extern void generic_kill_fasync(struct fasync_struct **, int, int); +/* only for net: no internal synchronization */ +extern void kill_fasync(struct fasync_struct *, int, int); + struct nameidata { struct dentry *dentry; struct vfsmount *mnt; @@ -558,10 +567,6 @@ int last_type; }; -#define FASYNC_MAGIC 0x4601 - -extern int fasync_helper(int, struct file *, int, struct fasync_struct **); - #define DQUOT_USR_ENABLED 0x01 /* User diskquotas enabled */ #define DQUOT_GRP_ENABLED 0x02 /* Group diskquotas enabled */ @@ -862,7 +867,6 @@ #define putname(name) free_page((unsigned long)(name)) enum {BDEV_FILE, BDEV_SWAP, BDEV_FS, BDEV_RAW}; -extern void kill_fasync(struct fasync_struct *, int, int); extern int register_blkdev(unsigned int, const char *, struct block_device_operations *); extern int unregister_blkdev(unsigned int, const char *); extern struct block_device *bdget(dev_t); --- 2.3/fs/fcntl.c Sun Feb 27 08:57:11 2000 +++ build-2.3/fs/fcntl.c Thu May 4 11:09:25 2000 @@ -7,6 +7,7 @@ #include <linux/mm.h> #include <linux/file.h> #include <linux/smp_lock.h> +#include <linux/slab.h> #include <asm/poll.h> #include <asm/siginfo.h> @@ -326,6 +327,51 @@ read_unlock(&tasklist_lock); } +/* + * generic_fasync_helper() is used by some character device drivers (mainly mice) + * to set up the fasync queue. It returns negative on error, 0 if it did + * no changes and positive if it added/deleted the entry. + */ +static rwlock_t fasync_lock = RW_LOCK_UNLOCKED; +int generic_fasync_helper(int fd, struct file * filp, int on, struct fasync_struct **fapp) +{ + struct fasync_struct *fa, **fp; + struct fasync_struct *new = NULL; + int result = 0; + + if (on) { + new = (struct fasync_struct *)kmalloc(sizeof(struct fasync_struct), GFP_KERNEL); + if (!new) + return -ENOMEM; + } + write_lock_irq(&fasync_lock); + for (fp = fapp; (fa = *fp) != NULL; fp = &fa->fa_next) { + if (fa->fa_file == filp) { + if(on) { + fa->fa_fd = fd; + kfree(new); + } else { + *fp = fa->fa_next; + kfree(fa); + result = 1; + } + goto out; + } + } + + if (on) { + new->magic = FASYNC_MAGIC; + new->fa_file = filp; + new->fa_fd = fd; + new->fa_next = *fapp; + *fapp = new; + result = 1; + } +out: + write_unlock_irq(&fasync_lock); + return result; +} + void kill_fasync(struct fasync_struct *fa, int sig, int band) { while (fa) { @@ -343,4 +389,11 @@ send_sigio(fown, fa, band); fa = fa->fa_next; } +} + +void generic_kill_fasync(struct fasync_struct **fp, int sig, int band) +{ + read_lock(&fasync_lock); + kill_fasync(*fp, sig, band); + read_unlock(&fasync_lock); } --- 2.3/drivers/char/tty_io.c Thu Apr 27 11:26:55 2000 +++ build-2.3/drivers/char/tty_io.c Thu May 4 00:25:11 2000 @@ -1425,49 +1425,6 @@ return 0; } -/* - * fasync_helper() is used by some character device drivers (mainly mice) - * to set up the fasync queue. It returns negative on error, 0 if it did - * no changes and positive if it added/deleted the entry. - */ -int fasync_helper(int fd, struct file * filp, int on, struct fasync_struct **fapp) -{ - struct fasync_struct *fa, **fp; - unsigned long flags; - - for (fp = fapp; (fa = *fp) != NULL; fp = &fa->fa_next) { - if (fa->fa_file == filp) - break; - } - - if (on) { - if (fa) { - fa->fa_fd = fd; - return 0; - } - fa = (struct fasync_struct *)kmalloc(sizeof(struct fasync_struct), GFP_KERNEL); - if (!fa) - return -ENOMEM; - fa->magic = FASYNC_MAGIC; - fa->fa_file = filp; - fa->fa_fd = fd; - save_flags(flags); - cli(); - fa->fa_next = *fapp; - *fapp = fa; - restore_flags(flags); - return 1; - } - if (!fa) - return 0; - save_flags(flags); - cli(); - *fp = fa->fa_next; - restore_flags(flags); - kfree(fa); - return 1; -} - static int tty_fasync(int fd, struct file * filp, int on) { struct tty_struct * tty; @@ -1477,7 +1434,7 @@ if (tty_paranoia_check(tty, filp->f_dentry->d_inode->i_rdev, "tty_fasync")) return 0; - retval = fasync_helper(fd, filp, on, &tty->fasync); + retval = generic_fasync_helper(fd, filp, on, &tty->fasync); if (retval <= 0) return retval; --- 2.3/drivers/char/busmouse.c Thu Apr 27 11:26:54 2000 +++ build-2.3/drivers/char/busmouse.c Thu May 4 00:32:37 2000 @@ -110,8 +110,7 @@ if (changed) { wake_up(&mse->wait); - if (mse->fasyncptr) - kill_fasync(mse->fasyncptr, SIGIO, POLL_IN); + generic_kill_fasync(&mse->fasyncptr, SIGIO, POLL_IN); } } @@ -157,7 +156,7 @@ struct busmouse_data *mse = (struct busmouse_data *)filp->private_data; int retval; - retval = fasync_helper(fd, filp, on, &mse->fasyncptr); + retval = generic_fasync_helper(fd, filp, on, &mse->fasyncptr); if (retval < 0) return retval; return 0; --- 2.3/drivers/char/pc110pad.c Thu Feb 10 22:38:58 2000 +++ build-2.3/drivers/char/pc110pad.c Thu May 4 00:37:49 2000 @@ -97,8 +97,7 @@ static void wake_readers(void) { wake_up_interruptible(&queue); - if(asyncptr) - kill_fasync(asyncptr, SIGIO, POLL_IN); + generic_kill_fasync(&asyncptr, SIGIO, POLL_IN); } @@ -579,7 +578,7 @@ { int retval; - retval = fasync_helper(fd, filp, on, &asyncptr); + retval = generic_fasync_helper(fd, filp, on, &asyncptr); if (retval < 0) return retval; return 0; --- 2.3/drivers/char/pc_keyb.c Thu Apr 27 11:26:55 2000 +++ build-2.3/drivers/char/pc_keyb.c Thu May 4 00:35:08 2000 @@ -415,8 +415,7 @@ head = (head + 1) & (AUX_BUF_SIZE-1); if (head != queue->tail) { queue->head = head; - if (queue->fasync) - kill_fasync(queue->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&queue->fasync, SIGIO, POLL_IN); wake_up_interruptible(&queue->proc_list); } } @@ -857,7 +856,7 @@ { int retval; - retval = fasync_helper(fd, filp, on, &queue->fasync); + retval = generic_fasync_helper(fd, filp, on, &queue->fasync); if (retval < 0) return retval; return 0; --- 2.3/drivers/char/qpmouse.c Thu Feb 10 22:38:58 2000 +++ build-2.3/drivers/char/qpmouse.c Thu May 4 00:36:07 2000 @@ -85,7 +85,7 @@ { int retval; - retval = fasync_helper(fd, filp, on, &queue->fasync); + retval = generic_fasync_helper(fd, filp, on, &queue->fasync); if (retval < 0) return retval; return 0; @@ -133,8 +133,7 @@ head &= QP_BUF_SIZE-1; } queue->head = head; - if (queue->fasync) - kill_fasync(queue->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&queue->fasync, SIGIO, POLL_IN); wake_up_interruptible(&queue->proc_list); } --- 2.3/drivers/char/rtc.c Thu Apr 27 11:26:55 2000 +++ build-2.3/drivers/char/rtc.c Thu May 4 10:24:21 2000 @@ -166,8 +166,7 @@ wake_up_interruptible(&rtc_wait); - if (rtc_async_queue) - kill_fasync (rtc_async_queue, SIGIO, POLL_IN); + generic_kill_fasync (&rtc_async_queue, SIGIO, POLL_IN); if (atomic_read(&rtc_status) & RTC_TIMER_ON) mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100); @@ -507,7 +506,7 @@ static int rtc_fasync (int fd, struct file *filp, int on) { - return fasync_helper (fd, filp, on, &rtc_async_queue); + return generic_fasync_helper (fd, filp, on, &rtc_async_queue); } static int rtc_release(struct inode *inode, struct file *file) --- 2.3/drivers/char/dn_keyb.c Tue Dec 7 10:43:28 1999 +++ build-2.3/drivers/char/dn_keyb.c Thu May 4 00:44:19 2000 @@ -357,17 +357,14 @@ mouse_dy+=mouse_packet[2] == 0xff ? 0 : (signed char)mouse_packet[2]; wake_up_interruptible(&mouse_wait); if (mouse_dx < -2048) - mouse_dx = -2048; - else - if (mouse_dx > 2048) - mouse_dx = 2048; - if (mouse_dy < -2048) - mouse_dy = -2048; - else - if (mouse_dy > 2048) - mouse_dy = 2048; - if (mouse_fasyncptr) - kill_fasync(mouse_fasyncptr, SIGIO, POLL_IN); + mouse_dx = -2048; + else if (mouse_dx > 2048) + mouse_dx = 2048; + if (mouse_dy < -2048) + mouse_dy = -2048; + else if (mouse_dy > 2048) + mouse_dy = 2048; + generic_kill_fasync(&mouse_fasyncptr, SIGIO, POLL_IN); } mouse_byte_count=0; /* printk("mouse: %d, %d, %x\n",mouse_x,mouse_y,buttons); */ --- 2.3/drivers/char/n_hdlc.c Thu Apr 27 11:26:54 2000 +++ build-2.3/drivers/char/n_hdlc.c Thu May 4 00:41:16 2000 @@ -663,7 +663,7 @@ #if LINUX_VERSION_CODE < VERSION(2,3,0) kill_fasync (n_hdlc->tty->fasync, SIGIO); #else - kill_fasync (n_hdlc->tty->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&n_hdlc->tty->fasync, SIGIO, POLL_IN); #endif } /* end of n_hdlc_tty_receive() */ --- 2.3/drivers/char/n_tty.c Thu Apr 27 11:26:54 2000 +++ build-2.3/drivers/char/n_tty.c Thu May 4 00:42:15 2000 @@ -630,8 +630,7 @@ put_tty_queue(c, tty); tty->canon_head = tty->read_head; tty->canon_data++; - if (tty->fasync) - kill_fasync(tty->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&tty->fasync, SIGIO, POLL_IN); if (waitqueue_active(&tty->read_wait)) wake_up_interruptible(&tty->read_wait); return; @@ -735,8 +734,7 @@ } if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) { - if (tty->fasync) - kill_fasync(tty->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&tty->fasync, SIGIO, POLL_IN); if (waitqueue_active(&tty->read_wait)) wake_up_interruptible(&tty->read_wait); } --- 2.3/drivers/net/wan/cosa.c Thu Apr 27 11:27:00 2000 +++ build-2.3/drivers/net/wan/cosa.c Thu May 4 10:09:51 2000 @@ -999,7 +999,7 @@ static int cosa_fasync(struct inode *inode, struct file *file, int on) { int port = MINOR(inode->i_rdev); - int rv = fasync_helper(inode, file, on, &fasync[port]); + int rv = generic_fasync_helper(inode, file, on, &fasync[port]); return rv < 0 ? rv : 0; } #endif --- 2.3/kernel/ksyms.c Thu Apr 27 11:27:26 2000 +++ build-2.3/kernel/ksyms.c Thu May 4 10:01:36 2000 @@ -491,7 +491,8 @@ EXPORT_SYMBOL(fs_overflowgid); /* all busmice */ -EXPORT_SYMBOL(fasync_helper); +EXPORT_SYMBOL(generic_fasync_helper); +EXPORT_SYMBOL(generic_kill_fasync); #ifdef CONFIG_BLK_DEV_MD EXPORT_SYMBOL(disk_name); /* for md.c */ --- 2.3/drivers/telephony/ixj.c Wed Mar 15 08:48:52 2000 +++ build-2.3/drivers/telephony/ixj.c Thu May 4 10:08:13 2000 @@ -446,8 +446,7 @@ { j->m_hook = 0; j->ex.bits.hookstate = 1; - if (j->async_queue) - kill_fasync(j->async_queue, SIGIO, POLL_IN); // Send apps notice of change + generic_kill_fasync(&j->async_queue, SIGIO, POLL_IN); // Send apps notice of change } goto timer_end; } @@ -536,8 +535,7 @@ j->proc_load = j->ssr.high << 8 | j->ssr.low; if (!j->m_hook) { j->m_hook = j->ex.bits.hookstate = 1; - if (j->async_queue) - kill_fasync(j->async_queue, SIGIO, POLL_IN); // Send apps notice of change + generic_kill_fasync(&j->async_queue, SIGIO, POLL_IN); // Send apps notice of change } } else { if (j->dsp.low == 0x21 && @@ -552,8 +550,7 @@ if (j->m_hook) { j->m_hook = 0; j->ex.bits.hookstate = 1; - if (j->async_queue) - kill_fasync(j->async_queue, SIGIO, POLL_IN); // Send apps notice of change + generic_kill_fasync(&j->async_queue, SIGIO, POLL_IN); // Send apps notice of change } } } @@ -642,8 +639,7 @@ } if (j->ex.bytes) { wake_up_interruptible(&j->poll_q); // Wake any blocked selects - if (j->async_queue) - kill_fasync(j->async_queue, SIGIO, POLL_IN); // Send apps notice of change + generic_kill_fasync(&j->async_queue, SIGIO, POLL_IN); // Send apps notice of change } } else { break; @@ -917,8 +913,7 @@ j->r_hook = fOffHook; if (j->port != PORT_POTS) { j->ex.bits.hookstate = 1; - if (j->async_queue) - kill_fasync(j->async_queue, SIGIO, POLL_IN); // Send apps notice of change + generic_kill_fasync(&j->async_queue, SIGIO, POLL_IN); // Send apps notice of change } } @@ -1471,8 +1466,7 @@ wake_up_interruptible(&j->poll_q); // Wake any blocked selects - if (j->async_queue) - kill_fasync(j->async_queue, SIGIO, POLL_IN); // Send apps notice of frame + generic_kill_fasync(&j->async_queue, SIGIO, POLL_IN); // Send apps notice of frame } } @@ -1557,8 +1551,7 @@ wake_up_interruptible(&j->poll_q); // Wake any blocked selects - if (j->async_queue) - kill_fasync(j->async_queue, SIGIO, POLL_IN); // Send apps notice of empty buffer + generic_kill_fasync(&j->async_queue, SIGIO, POLL_IN); // Send apps notice of empty buffer #ifdef PERFMON_STATS ++j->frameswritten; #endif @@ -3944,7 +3937,7 @@ static int ixj_fasync(int fd, struct file *file_p, int mode) { IXJ *j = &ixj[NUM(file_p->f_dentry->d_inode->i_rdev)]; - return fasync_helper(fd, file_p, mode, &j->async_queue); + return generic_fasync_helper(fd, file_p, mode, &j->async_queue); } struct file_operations ixj_fops = --- 2.3/drivers/char/drm/fops.c Wed Mar 15 08:48:51 2000 +++ build-2.3/drivers/char/drm/fops.c Thu May 4 10:11:17 2000 @@ -129,7 +129,7 @@ int retcode; DRM_DEBUG("fd = %d, device = 0x%x\n", fd, dev->device); - retcode = fasync_helper(fd, filp, on, &dev->buf_async); + retcode = generic_fasync_helper(fd, filp, on, &dev->buf_async); if (retcode < 0) return retcode; return 0; } @@ -216,7 +216,7 @@ if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO); #else /* Parameter added in 2.3.21 */ - if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN); + generic_kill_fasync(&dev->buf_async, SIGIO, POLL_IN); #endif DRM_DEBUG("waking\n"); wake_up_interruptible(&dev->buf_readers); --- 2.3/drivers/scsi/sg.c Wed Apr 12 15:00:23 2000 +++ build-2.3/drivers/scsi/sg.c Thu May 4 10:13:29 2000 @@ -951,7 +951,7 @@ SCSI_LOG_TIMEOUT(3, printk("sg_fasync: dev=%d, mode=%d\n", MINOR(sdp->i_rdev), mode)); - retval = fasync_helper(fd, filp, mode, &sfp->async_qp); + retval = generic_fasync_helper(fd, filp, mode, &sfp->async_qp); return (retval < 0) ? retval : 0; } @@ -1052,8 +1052,7 @@ if (sfp && srp) { /* Now wake up any sg_read() that is waiting for this packet. */ wake_up_interruptible(&sfp->read_wait); - if (sfp->async_qp) - kill_fasync(sfp->async_qp, SIGPOLL, POLL_IN); + generic_kill_fasync(&sfp->async_qp, SIGPOLL, POLL_IN); } } --- 2.3/drivers/sbus/char/sunkbd.c Thu Apr 27 11:27:01 2000 +++ build-2.3/drivers/sbus/char/sunkbd.c Thu May 4 10:14:21 2000 @@ -1311,8 +1311,7 @@ } spin_unlock_irqrestore(&kbd_queue_lock, flags); - if (kb_fasync) - kill_fasync (kb_fasync, SIGIO, POLL_IN); + generic_kill_fasync (&kb_fasync, SIGIO, POLL_IN); wake_up_interruptible (&kbd_wait); } @@ -1382,7 +1381,7 @@ { int retval; - retval = fasync_helper (fd, filp, on, &kb_fasync); + retval = generic_fasync_helper (fd, filp, on, &kb_fasync); if (retval < 0) return retval; return 0; --- 2.3/drivers/sbus/char/pcikbd.c Thu Apr 27 11:27:01 2000 +++ build-2.3/drivers/sbus/char/pcikbd.c Thu May 4 10:15:10 2000 @@ -628,7 +628,7 @@ { int retval; - retval = fasync_helper(fd, filp, on, &queue->fasync); + retval = generic_fasync_helper(fd, filp, on, &queue->fasync); if (retval < 0) return retval; return 0; @@ -738,8 +738,7 @@ spin_unlock_irqrestore(&pcikbd_lock, flags); - if (queue->fasync) - kill_fasync(queue->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&queue->fasync, SIGIO, POLL_IN); wake_up_interruptible(&queue->proc_list); } --- 2.3/drivers/sbus/char/sunmouse.c Thu Apr 27 11:27:01 2000 +++ build-2.3/drivers/sbus/char/sunmouse.c Thu May 4 10:17:00 2000 @@ -147,8 +147,7 @@ spin_unlock_irqrestore(&sunmouse.lock, flags); - if (sunmouse.fasync) - kill_fasync (sunmouse.fasync, SIGIO, POLL_IN); + generic_kill_fasync (&sunmouse.fasync, SIGIO, POLL_IN); wake_up_interruptible (&sunmouse.proc_list); } @@ -382,8 +381,7 @@ /* We just completed a transaction, wake up whoever is awaiting * this event. */ - if (sunmouse.fasync) - kill_fasync (sunmouse.fasync, SIGIO, POLL_IN); + generic_kill_fasync (&sunmouse.fasync, SIGIO, POLL_IN); wake_up_interruptible(&sunmouse.proc_list); } return; @@ -404,7 +402,7 @@ { int retval; - retval = fasync_helper (fd, filp, on, &sunmouse.fasync); + retval = generic_fasync_helper (fd, filp, on, &sunmouse.fasync); if (retval < 0) return retval; return 0; --- 2.3/drivers/sgi/char/shmiq.c Sun Feb 27 08:57:09 2000 +++ build-2.3/drivers/sgi/char/shmiq.c Thu May 4 10:17:31 2000 @@ -118,8 +118,7 @@ e->data.device, e->data.which, e->data.type, e->data.flags); s->tail = tail_next; shmiqs [device].tail = tail_next; - if (shmiqs [device].fasync) - kill_fasync (shmiqs [device].fasync, SIGIO, POLL_IN); + generic_kill_fasync (&shmiqs [device].fasync, SIGIO, POLL_IN); wake_up_interruptible (&shmiqs [device].proc_list); } @@ -395,7 +394,7 @@ int retval; int minor = MINOR (file->f_dentry->d_inode->i_rdev); - retval = fasync_helper (fd, file, on, &shmiqs [minor].fasync); + retval = generic_fasync_helper (fd, file, on, &shmiqs [minor].fasync); if (retval < 0) return retval; return 0; --- 2.3/drivers/usb/mousedev.c Thu Apr 27 11:27:10 2000 +++ build-2.3/drivers/usb/mousedev.c Thu May 4 10:19:03 2000 @@ -138,8 +138,7 @@ list->ready = 1; - if (list->fasync) - kill_fasync(list->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&list->fasync, SIGIO, POLL_IN); list = list->next; } @@ -153,7 +152,7 @@ { int retval; struct mousedev_list *list = file->private_data; - retval = fasync_helper(fd, file, on, &list->fasync); + retval = generic_fasync_helper(fd, file, on, &list->fasync); return retval < 0 ? retval : 0; } @@ -311,8 +310,7 @@ list->buffer = list->bufsiz; } - if (list->fasync) - kill_fasync(list->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&list->fasync, SIGIO, POLL_IN); wake_up_interruptible(&list->mousedev->wait); --- 2.3/drivers/usb/joydev.c Thu Apr 27 11:27:10 2000 +++ build-2.3/drivers/usb/joydev.c Thu May 4 10:19:42 2000 @@ -139,8 +139,7 @@ if (list->tail == (list->head = (list->head + 1) & (JOYDEV_BUFFER_SIZE - 1))) list->startup = 0; - if (list->fasync) - kill_fasync(list->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&list->fasync, SIGIO, POLL_IN); list = list->next; } @@ -152,7 +151,7 @@ { int retval; struct joydev_list *list = file->private_data; - retval = fasync_helper(fd, file, on, &list->fasync); + retval = generic_fasync_helper(fd, file, on, &list->fasync); return retval < 0 ? retval : 0; } --- 2.3/drivers/usb/evdev.c Thu Apr 27 11:27:10 2000 +++ build-2.3/drivers/usb/evdev.c Thu May 4 10:20:31 2000 @@ -72,8 +72,7 @@ list->buffer[list->head].value = value; list->head = (list->head + 1) & (EVDEV_BUFFER_SIZE - 1); - if (list->fasync) - kill_fasync(list->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&list->fasync, SIGIO, POLL_IN); list = list->next; } @@ -85,7 +84,7 @@ { int retval; struct evdev_list *list = file->private_data; - retval = fasync_helper(fd, file, on, &list->fasync); + retval = generic_fasync_helper(fd, file, on, &list->fasync); return retval < 0 ? retval : 0; } --- 2.3/drivers/i2o/i2o_config.c Thu Apr 27 11:26:55 2000 +++ build-2.3/drivers/i2o/i2o_config.c Thu May 4 10:21:21 2000 @@ -161,8 +161,7 @@ // printk(KERN_INFO "File %p w/id %d has %d events\n", // inf->fp, inf->q_id, inf->q_len); - if(inf->fasync) - kill_fasync(inf->fasync, SIGIO, POLL_IN); + generic_kill_fasync(&inf->fasync, SIGIO, POLL_IN); } return; @@ -889,7 +888,7 @@ if(!p) return -EBADF; - return fasync_helper(fd, fp, on, &p->fasync); + return generic_fasync_helper(fd, fp, on, &p->fasync); } static struct file_operations config_fops =

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:14 EST