[PATCH] 2.2: Rusty's fasync patch backported

From: Chip Salzenberg (chip@valinux.com)
Date: Tue Aug 29 2000 - 20:13:36 EST


2.2 currently ignores the return value of f_op->fasync().
This patch fixes that oversight.

Index: fs/ioctl.c
--- fs/ioctl.c.prev
+++ fs/ioctl.c Sat Jun 17 17:48:10 2000
@@ -85,6 +85,10 @@ asmlinkage int sys_ioctl(unsigned int fd
                         if ((flag ^ filp->f_flags) & FASYNC) {
                                 if (filp->f_op && filp->f_op->fasync)
- filp->f_op->fasync(fd, filp, on);
+ error = filp->f_op->fasync(fd, filp, on);
+ else error = -ENOTTY;
                         }
+ if (error != 0)
+ break;
+
                         if (on)
                                 filp->f_flags |= FASYNC;

-- 
Chip Salzenberg              - a.k.a. -              <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:24 EST